/* Glassmorphic Surfaces */
.glass-panel {
    background: rgba(18, 24, 38, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* Color Accents */
:root {
    --primary-gradient: linear-gradient(135deg, #FF6B6B 0%, #FFA07A 100%);
    --success-color: #10B981;
    --success-glow: rgba(16, 185, 129, 0.4);
    --highlight-border: rgba(99, 102, 241, 0.8);
    --highlight-bg: rgba(99, 102, 241, 0.15);
}

/* Typography Enhancements */
body, h1, h2, h3, p, button, input, textarea {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    color: #ffffff; /* WCAG AAA contrast against dark glass */
}

/* Menu items selection highlight */
.nav-item.selected, .nav-item:focus {
    border-color: var(--highlight-border) !important;
    background: var(--highlight-bg) !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    transition: all 0.15s ease;
}

/* Buttons Hover/Active States */
button {
    transition: all 0.15s ease;
}
button:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}
button:active {
    transform: scale(0.96);
}

/* Screen Transitions */
.screen-enter {
    animation: screenFadeIn 0.2s ease-out forwards;
}
@keyframes screenFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Visual Toast (Pill) */
#visual-toast-container {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none; /* Never block interactions */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.visual-toast {
    background: rgba(18, 24, 38, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 12px 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    color: #fff;
    font-weight: bold;
    text-align: center;
    transform-origin: center bottom;
    animation: toastEnter 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.visual-toast.toast-fade-out {
    animation: toastExit 0.35s ease-in forwards;
}

@keyframes toastEnter {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastExit {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .screen-enter {
        animation: none;
    }
}

/* Blind Mode - completely hide visual toasts and remove all animations/glass effects */
body.blind-mode .visual-toast, body.blind-mode #visual-toast-container {
    display: none !important;
}
body.blind-mode .glass-panel, body.blind-mode .nav-item {
    background: #000 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid #333 !important;
    box-shadow: none !important;
}


/* Override Action Button with Vibrant Coral Gradient */
.action-button, .btn-chat-send {
    background: var(--primary-gradient) !important;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4) !important;
    border: none !important;
}

.action-button:hover, .btn-chat-send:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 160, 122, 0.6) !important;
}

/* Override Success indicators / specific buttons (Mint Emerald) */
.btn-success, #btn-voice-comms, #btn-confirm-table-name {
    background: var(--success-color) !important;
    box-shadow: 0 0 15px var(--success-glow) !important;
    border: none !important;
}

.btn-success:hover, #btn-voice-comms:hover, #btn-confirm-table-name:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6) !important;
}

/* Toast Color Variations */
.visual-toast.toast-success {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.25);
}
.visual-toast.toast-error, .visual-toast.toast-warning {
    border-color: rgba(255, 107, 107, 0.4);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.25);
}
.visual-toast.toast-info {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.25);
}

/* Victory Glow */
.victory-glow {
    animation: victoryPulse 0.4s ease-out;
}
@keyframes victoryPulse {
    0% {
        box-shadow: 0 0 0 rgba(16, 185, 129, 0);
        border-color: rgba(255, 255, 255, 0.12);
    }
    50% {
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.6), inset 0 0 15px rgba(255, 215, 0, 0.3);
        border-color: rgba(16, 185, 129, 0.8);
    }
    100% {
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
        border-color: rgba(255, 255, 255, 0.12);
    }
}

/* Enforced Blind Mode Resets */
body.blind-mode * {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
body.blind-mode .glass-panel, body.blind-mode .nav-item {
    background: #000 !important;
    border: 1px solid #333 !important;
    color: #fff !important;
}
