/**
 * 📄 File: dashboard.css
 * Purpose: Custom styles for complexity dashboard
 * Created: 2025-11-21
 * Used by: Dashboard HTML pages
 */

/* === SLIDER STYLING === */

/* Custom teal slider for webkit browsers */
.slider-teal {
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #e5e7eb 0%, #e5e7eb 100%);
    outline: none;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.slider-teal:hover {
    opacity: 1;
}

/* Webkit slider thumb (Chrome, Safari, Edge) */
.slider-teal::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.slider-teal::-webkit-slider-thumb:hover {
    width: 24px;
    height: 24px;
    box-shadow: 0 3px 8px rgba(20, 184, 166, 0.4);
}

.slider-teal::-webkit-slider-thumb:active {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Firefox slider thumb */
.slider-teal::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.slider-teal::-moz-range-thumb:hover {
    width: 24px;
    height: 24px;
    box-shadow: 0 3px 8px rgba(20, 184, 166, 0.4);
}

.slider-teal::-moz-range-thumb:active {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Slider track styling */
.slider-teal::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #e5e7eb 0%, #d1d5db 100%);
    transition: background 0.3s ease;
}

.slider-teal::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #e5e7eb 0%, #d1d5db 100%);
    transition: background 0.3s ease;
}

/* Dynamic track fill (requires JS to update CSS variable) */
.slider-teal[data-filled] {
    background: linear-gradient(
        to right,
        #14b8a6 0%,
        #14b8a6 var(--fill-percent),
        #e5e7eb var(--fill-percent),
        #e5e7eb 100%
    );
}

/* === CARD EFFECTS === */

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
    cursor: default;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Interactive cards */
.interactive-card {
    position: relative;
    overflow: hidden;
}

.interactive-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(20, 184, 166, 0.05),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.interactive-card:hover::before {
    animation: card-shimmer 0.5s ease;
}

@keyframes card-shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

/* === SIGNAL LOSS ANIMATION === */

/* Pulsing warning for signal loss */
.signal-loss-warning {
    animation: signal-pulse 2s ease-in-out infinite;
}

@keyframes signal-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.9;
    }
}

/* Signal loss indicator dot */
.signal-loss-dot {
    position: relative;
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: dot-pulse 1.5s ease-in-out infinite;
}

.signal-loss-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ef4444;
    border-radius: 50%;
    animation: dot-ripple 1.5s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes dot-ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* === VALUE INDICATORS === */

/* Value bars with gradient */
.value-bar {
    position: relative;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.value-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease, background 0.3s ease;
}

/* Dynamic color based on value */
.value-bar-fill[data-value="low"] {
    background: linear-gradient(to right, #ef4444, #f87171);
}

.value-bar-fill[data-value="medium"] {
    background: linear-gradient(to right, #f59e0b, #fbbf24);
}

.value-bar-fill[data-value="high"] {
    background: linear-gradient(to right, #14b8a6, #2dd4bf);
}

/* === BUTTON ENHANCEMENTS === */

/* Operation button effects */
.operation-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.operation-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.operation-btn:hover::before {
    width: 300px;
    height: 300px;
}

.operation-btn:active {
    transform: scale(0.98);
}

/* === TOOLTIP STYLES === */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    background-color: #1f2937;
    color: #fff;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tooltip .tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* === LOADING STATES === */

.loading-skeleton {
    background: linear-gradient(
        90deg,
        #f3f4f6 25%,
        #e5e7eb 50%,
        #f3f4f6 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* === TRANSITIONS === */

/* Smooth number transitions */
.smooth-number {
    transition: all 0.3s ease;
}

.smooth-number.updating {
    color: #14b8a6;
    transform: scale(1.1);
}

/* === RESPONSIVE ADJUSTMENTS === */

@media (max-width: 768px) {
    .slider-teal::-webkit-slider-thumb,
    .slider-teal::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }

    .slider-teal::-webkit-slider-thumb:hover,
    .slider-teal::-moz-range-thumb:hover {
        width: 28px;
        height: 28px;
    }
}

/* === UTILITY CLASSES === */

/* Prevent text selection on interactive elements */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Smooth scroll for containers */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* Focus visible for accessibility */
.focus-visible:focus {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* === DARK MODE SUPPORT (optional) === */

@media (prefers-color-scheme: dark) {
    .dark-mode-support {
        /* Add dark mode styles here if needed */
        /* Currently dashboard uses light theme only */
    }
}

/* === PRINT STYLES === */

@media print {
    .no-print {
        display: none !important;
    }

    .print-friendly {
        color: #000 !important;
        background: #fff !important;
    }
}