/**
 * Sympathico Chat Widget Styles
 * EU AI Act Compliance Advisor Theme
 * Premium glassmorphism design
 * 
 * @version 2.0.0
 * @author Hi.AI Design
 */

/* =========================================
   CSS Variables - Dark Theme (Default)
   ========================================= */
:root {
    /* Premium Colors - EU Compliance Theme */
    --symp-primary: #00cfff;           /* Trust cyan */
    --symp-secondary: #6366f1;         /* Professional indigo */
    --symp-accent: #8b5cf6;            /* Authority purple */
    --symp-success: #10b981;           /* Compliant green */
    --symp-warning: #f59e0b;           /* Attention amber */
    --symp-danger: #ef4444;            /* Risk red */
    --symp-gold: #fbbf24;              /* Premium gold */
    
    /* Backgrounds */
    --symp-bg-dark: rgba(10, 15, 28, 0.98);
    --symp-bg-glass: rgba(25, 32, 55, 0.7);
    --symp-bg-glass-light: rgba(40, 50, 80, 0.5);
    --symp-bg-input: rgba(15, 20, 35, 0.9);
    
    /* Text Colors */
    --symp-text-primary: #f8fafc;
    --symp-text-secondary: rgba(248, 250, 252, 0.75);
    --symp-text-muted: rgba(248, 250, 252, 0.5);
    
    /* Borders */
    --symp-border-glow: 1px solid rgba(0, 207, 255, 0.35);
    --symp-border-subtle: 1px solid rgba(255, 255, 255, 0.08);
    
    /* Shadows */
    --symp-shadow-glow: 0 0 25px rgba(0, 207, 255, 0.25);
    --symp-shadow-strong: 0 25px 60px rgba(0, 0, 0, 0.6);
    --symp-shadow-accent: 0 0 40px rgba(139, 92, 246, 0.3);
    
    /* Gradients */
    --symp-gradient-main: linear-gradient(135deg, var(--symp-primary), var(--symp-accent));
    --symp-gradient-button: linear-gradient(135deg, var(--symp-primary), var(--symp-secondary));
    --symp-gradient-premium: linear-gradient(135deg, var(--symp-gold), var(--symp-warning));
    
    /* Sizing */
    --symp-widget-width: 440px;
    --symp-widget-height: 700px;
    --symp-widget-max-height: 85vh;
    --symp-widget-max-height: 85dvh;
    --symp-border-radius: 20px;
    --symp-border-radius-sm: 10px;
    --symp-spacing: 16px;
    
    /* Animation */
    --symp-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --symp-transition-fast: 0.15s ease-out;
    
    /* Glow Colors */
    --symp-glow-cyan: rgba(0, 207, 255, 0.4);
    --symp-glow-purple: rgba(139, 92, 246, 0.3);
}

/* =========================================
   Light Theme Override
   ========================================= */
[data-theme="light"] {
    --symp-primary: #0099cc;           /* Darker cyan for light bg */
    --symp-secondary: #4f46e5;         /* Darker indigo */
    --symp-accent: #7c3aed;            /* Darker purple */
    
    /* Light theme backgrounds */
    --symp-bg-dark: rgba(255, 255, 255, 0.98);
    --symp-bg-glass: rgba(248, 250, 252, 0.95);
    --symp-bg-glass-light: rgba(241, 245, 249, 0.9);
    --symp-bg-input: rgba(255, 255, 255, 0.95);
    
    /* Light theme text - BLACK for readability */
    --symp-text-primary: #0f172a;
    --symp-text-secondary: rgba(15, 23, 42, 0.75);
    --symp-text-muted: rgba(15, 23, 42, 0.5);
    
    /* Light theme borders */
    --symp-border-glow: 1px solid rgba(0, 153, 204, 0.3);
    --symp-border-subtle: 1px solid rgba(0, 0, 0, 0.08);
    
    /* Light theme shadows - softer */
    --symp-shadow-glow: 0 4px 20px rgba(0, 153, 204, 0.15);
    --symp-shadow-strong: 0 25px 60px rgba(0, 0, 0, 0.15);
    --symp-shadow-accent: 0 4px 20px rgba(124, 58, 237, 0.15);
}

/* =========================================
   FAB (Floating Action Button)
   ========================================= */
.sympathico-fab {
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--symp-gradient-main);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--symp-shadow-glow), var(--symp-shadow-strong);
    z-index: 10000;
    transition: var(--symp-transition);
    animation: sympathico-pulse 2s infinite;
}

/* Responsive FAB sizing */
@media (min-width: 768px) {
    .sympathico-fab {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
    }
}

@media (min-width: 1024px) {
    .sympathico-fab {
        width: 48px;
        height: 48px;
    }
}

.sympathico-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 0 40px rgba(0, 207, 255, 0.6), var(--symp-shadow-strong);
}

.sympathico-fab svg {
    width: 18px;
    height: 18px;
    fill: white;
    transition: var(--symp-transition);
}

/* Responsive SVG sizing */
@media (min-width: 768px) {
    .sympathico-fab svg {
        width: 20px;
        height: 20px;
    }
}

@media (min-width: 1024px) {
    .sympathico-fab svg {
        width: 22px;
        height: 22px;
    }
}

.sympathico-fab.active svg {
    transform: rotate(180deg);
}

.sympathico-fab .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    background: var(--symp-neon-pink);
    border-radius: 50%;
    border: 2px solid #0f0f1e;
    animation: sympathico-pulse 1.5s infinite;
}

@keyframes sympathico-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* =========================================
   Launcher Button (symp-launcher)
   ========================================= */
.symp-launcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--symp-gradient-main);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--symp-shadow-glow), var(--symp-shadow-strong);
    z-index: 10000;
    transition: var(--symp-transition);
    padding: 0;
    overflow: visible;
}

.symp-launcher img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 50%;
}

.symp-launcher:hover {
    transform: scale(1.08);
    box-shadow: 0 0 40px rgba(0, 207, 255, 0.6), 0 0 80px rgba(139, 92, 246, 0.2), var(--symp-shadow-strong);
}

.symp-launcher::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--symp-primary), var(--symp-accent), var(--symp-secondary), var(--symp-primary));
    z-index: -1;
    animation: symp-launcher-ring 3s linear infinite;
    opacity: 0.6;
}

@keyframes symp-launcher-ring {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.symp-launcher-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--symp-gradient-main);
    animation: launcher-pulse 2s ease-out infinite;
    opacity: 0;
    z-index: -1;
}

@keyframes launcher-pulse {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Responsive launcher sizing */
@media (min-width: 768px) {
    .symp-launcher {
        width: 72px;
        height: 72px;
        bottom: 24px;
        right: 24px;
    }
    .symp-launcher img {
        width: 42px;
        height: 42px;
    }
}

@media (min-width: 1024px) {
    .symp-launcher {
        width: 80px;
        height: 80px;
    }
    .symp-launcher img {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .symp-launcher {
        width: 56px;
        height: 56px;
        bottom: 16px;
        right: 16px;
    }
    .symp-launcher img {
        width: 32px;
        height: 32px;
    }
}

/* Light theme launcher */
[data-theme="light"] .symp-launcher {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .symp-launcher:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* =========================================
   Launcher Dismiss Button
   ========================================= */
.symp-launcher-dismiss {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(30, 30, 50, 0.9);
    border: 2px solid rgba(0, 207, 255, 0.5);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
    padding: 0;
}

.symp-launcher:hover .symp-launcher-dismiss,
.symp-launcher:focus-within .symp-launcher-dismiss,
.symp-launcher-dismiss.visible {
    opacity: 1;
    pointer-events: auto;
}

.symp-launcher-dismiss:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: scale(1.15);
}

[data-theme="light"] .symp-launcher-dismiss {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.2);
    color: #333;
}
[data-theme="light"] .symp-launcher-dismiss:hover {
    background: #ef4444;
    color: #fff;
}

/* Sympathico minimized restore button */
.symp-restore-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--symp-gradient-main);
    border: 2px solid rgba(0, 207, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    box-shadow: var(--symp-shadow-glow);
    transition: var(--symp-transition);
    animation: sympathico-pulse 2s infinite;
    padding: 0;
}
.symp-restore-btn:hover {
    transform: scale(1.1);
}
.symp-restore-btn img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: contain;
}

/* Dragging state */
.symp-launcher.dragging {
    opacity: 0.85;
    cursor: grabbing !important;
    transition: none !important;
}
.symp-launcher.dragging * {
    pointer-events: none !important;
}

/* =========================================
   Widget Container
   ========================================= */
.sympathico-widget,
.symp-panel {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: var(--symp-widget-width);
    max-width: calc(100vw - 48px);
    height: var(--symp-widget-height);
    max-height: var(--symp-widget-max-height);
    background: var(--symp-bg-dark);
    border-radius: var(--symp-border-radius);
    border: var(--symp-border-glow);
    box-shadow: var(--symp-shadow-glow), var(--symp-shadow-strong);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: var(--symp-transition);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.sympathico-widget.open,
.symp-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    animation: symp-panel-spring 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes symp-panel-spring {
    0% { opacity: 0; transform: translateY(30px) scale(0.85); filter: blur(4px); }
    50% { opacity: 1; filter: blur(0); }
    70% { transform: translateY(-4px) scale(1.01); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* =========================================
   Header
   ========================================= */
.sympathico-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--symp-spacing);
    background: var(--symp-bg-glass);
    border-bottom: var(--symp-border-subtle);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.sympathico-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sympathico-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--symp-gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 207, 255, 0.4);
}

.sympathico-avatar svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.sympathico-status {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sympathico-status h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--symp-text-primary);
    margin: 0;
    background: var(--symp-gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sympathico-status span {
    font-size: 12px;
    color: var(--symp-neon-green);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sympathico-status span::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--symp-neon-green);
    border-radius: 50%;
    animation: sympathico-pulse 1.5s infinite;
}

/* Header Ambient Glow */
.sympathico-header::after,
.symp-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--symp-primary), var(--symp-accent), var(--symp-primary), transparent);
    background-size: 200% 100%;
    animation: symp-header-glow 4s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes symp-header-glow {
    0%, 100% { background-position: 200% 0; opacity: 0.5; }
    50% { background-position: 0% 0; opacity: 0.9; }
}

/* Header Actions */
.sympathico-actions {
    display: flex;
    gap: 8px;
}

.sympathico-actions button {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: var(--symp-border-subtle);
    background: var(--symp-bg-glass-light);
    color: var(--symp-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--symp-transition-fast);
}

.sympathico-actions button:hover {
    background: rgba(0, 207, 255, 0.2);
    color: var(--symp-neon-cyan);
    border-color: rgba(0, 207, 255, 0.4);
}

.sympathico-actions button.active {
    background: rgba(0, 207, 255, 0.3);
    color: var(--symp-neon-cyan);
}

.sympathico-actions button svg {
    width: 18px;
    height: 18px;
}

/* =========================================
   Messages Container
   ========================================= */
.sympathico-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--symp-spacing);
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.sympathico-messages::-webkit-scrollbar {
    width: 4px;
}

.sympathico-messages::-webkit-scrollbar-track {
    background: transparent;
}

.sympathico-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 207, 255, 0.3);
    border-radius: 4px;
}

.sympathico-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 207, 255, 0.5);
}

/* =========================================
   Message Bubbles
   ========================================= */
.sympathico-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    min-width: 0;
    overflow: visible;
    animation: sympathico-message-in 0.3s ease-out;
}

@keyframes sympathico-message-in {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.95);
        filter: blur(4px);
    }
    60% {
        opacity: 1;
        filter: blur(0);
    }
    80% {
        transform: translateY(-2px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.sympathico-message.user {
    animation: sympathico-message-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.sympathico-message.bot {
    animation: sympathico-message-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.sympathico-message.user {
    align-self: flex-end;
}

.sympathico-message.bot {
    align-self: flex-start;
}

.sympathico-message .bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

.sympathico-message.user .bubble {
    background: var(--symp-gradient-main);
    color: white;
    border-bottom-right-radius: 4px;
}

.sympathico-message.bot .bubble {
    background: var(--symp-bg-glass);
    color: var(--symp-text-primary);
    border: 1px solid rgba(0, 207, 255, 0.12);
    border-bottom-left-radius: 4px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 0 20px rgba(0, 207, 255, 0.06), inset 0 0 30px rgba(0, 207, 255, 0.03);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.sympathico-message.bot .bubble:hover {
    border-color: rgba(0, 207, 255, 0.25);
    box-shadow: 0 0 25px rgba(0, 207, 255, 0.12), inset 0 0 30px rgba(0, 207, 255, 0.05);
}

/* User message glow */
.sympathico-message.user .bubble {
    box-shadow: 0 4px 20px rgba(0, 207, 255, 0.25);
}

.sympathico-message .timestamp {
    font-size: 10px;
    color: var(--symp-text-muted);
    margin-top: 4px;
    padding: 0 4px;
}

.sympathico-message.user .timestamp {
    text-align: right;
}

/* Typing Indicator */
.sympathico-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--symp-bg-glass);
    border: var(--symp-border-subtle);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.sympathico-typing-dots {
    display: flex;
    gap: 4px;
}

.sympathico-typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: sympathico-typing 1.4s ease-in-out infinite;
}

.sympathico-typing-dots span:nth-child(1) {
    background: var(--symp-primary);
}
.sympathico-typing-dots span:nth-child(2) {
    background: var(--symp-secondary);
}
.sympathico-typing-dots span:nth-child(3) {
    background: var(--symp-accent);
}

.sympathico-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.sympathico-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes sympathico-typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* =========================================
   Quick Actions
   ========================================= */
.sympathico-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px var(--symp-spacing);
    border-top: var(--symp-border-subtle);
    background: var(--symp-bg-glass);
}

.sympathico-quick-btn {
    padding: 8px 16px;
    background: var(--symp-bg-glass-light);
    border: var(--symp-border-subtle);
    border-radius: 20px;
    color: var(--symp-text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--symp-transition-fast);
    white-space: nowrap;
}

.sympathico-quick-btn:hover {
    background: rgba(0, 207, 255, 0.2);
    border-color: rgba(0, 207, 255, 0.4);
    color: var(--symp-neon-cyan);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 207, 255, 0.25);
}

/* =========================================
   Input Area
   ========================================= */
.sympathico-input-area {
    padding: var(--symp-spacing);
    background: var(--symp-bg-glass);
    border-top: var(--symp-border-subtle);
    flex-shrink: 0;
}

.sympathico-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--symp-bg-input);
    border: var(--symp-border-subtle);
    border-radius: 16px;
    transition: var(--symp-transition-fast);
}

.sympathico-input-container:focus-within {
    border-color: rgba(0, 207, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 207, 255, 0.2);
}

.sympathico-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--symp-text-primary);
    font-size: 16px;
    padding: 8px 12px;
    outline: none;
    min-width: 0;
}

.sympathico-input::placeholder {
    color: var(--symp-text-muted);
}

.sympathico-input-actions {
    display: flex;
    gap: 4px;
}

.sympathico-input-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--symp-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--symp-transition-fast);
}

.sympathico-input-btn:hover {
    background: rgba(0, 207, 255, 0.2);
    color: var(--symp-neon-cyan);
}

.sympathico-input-btn.active {
    background: rgba(57, 255, 20, 0.3);
    color: var(--symp-neon-green);
}

.sympathico-input-btn.primary {
    background: var(--symp-gradient-main);
    color: white;
}

.sympathico-input-btn.primary:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

.sympathico-input-btn svg {
    width: 18px;
    height: 18px;
}

/* =========================================
   Voice Status
   ========================================= */
.sympathico-voice-status {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    background: rgba(57, 255, 20, 0.1);
    border-top: 1px solid rgba(57, 255, 20, 0.3);
    animation: sympathico-message-in 0.3s ease-out;
}

.sympathico-voice-visualizer {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 24px;
}

.symp-voice-bar {
    width: 3px;
    height: 4px;
    background: var(--symp-neon-green);
    border-radius: 2px;
    transition: height 0.1s ease;
}

.sympathico-voice-text {
    font-size: 13px;
    color: var(--symp-text-secondary);
}

.sympathico-voice-text .interim {
    color: var(--symp-text-muted);
    font-style: italic;
}

.sympathico-voice-text .success {
    color: var(--symp-neon-green);
}

/* =========================================
   Forms (Contact, Meeting)
   ========================================= */
.sympathico-form {
    padding: var(--symp-spacing);
    background: var(--symp-bg-glass);
    border-radius: var(--symp-border-radius-sm);
    border: var(--symp-border-subtle);
    margin: 8px 0;
}

.sympathico-form h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--symp-neon-cyan);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sympathico-form-group {
    margin-bottom: 12px;
}

.sympathico-form-group:last-child {
    margin-bottom: 0;
}

.sympathico-form input,
.sympathico-form textarea,
.sympathico-form select {
    width: 100%;
    padding: 10px 12px;
    background: var(--symp-bg-input);
    border: var(--symp-border-subtle);
    border-radius: 8px;
    color: var(--symp-text-primary);
    font-size: 14px;
    transition: var(--symp-transition-fast);
}

.sympathico-form input:focus,
.sympathico-form textarea:focus,
.sympathico-form select:focus {
    outline: none;
    border-color: rgba(0, 207, 255, 0.5);
    box-shadow: 0 0 8px rgba(0, 207, 255, 0.2);
}

.sympathico-form input::placeholder,
.sympathico-form textarea::placeholder {
    color: var(--symp-text-muted);
}

.sympathico-form textarea {
    resize: vertical;
    min-height: 80px;
}

.sympathico-form-submit {
    width: 100%;
    padding: 12px;
    background: var(--symp-gradient-main);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--symp-transition-fast);
    margin-top: 8px;
}

.sympathico-form-submit:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.sympathico-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* =========================================
   File Attachment
   ========================================= */
.sympathico-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    background: var(--symp-bg-glass-light);
    border-radius: 8px;
    margin-bottom: 8px;
}

.sympathico-attachment {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--symp-bg-input);
    border-radius: 6px;
    font-size: 12px;
    color: var(--symp-text-secondary);
}

.sympathico-attachment svg {
    width: 14px;
    height: 14px;
}

.sympathico-attachment .remove {
    cursor: pointer;
    color: var(--symp-neon-pink);
    margin-left: 4px;
}

/* =========================================
   Language Toggle
   ========================================= */
.sympathico-lang-toggle {
    display: flex;
    background: var(--symp-bg-input);
    border-radius: 8px;
    overflow: hidden;
    border: var(--symp-border-subtle);
}

.sympathico-lang-btn {
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: var(--symp-text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--symp-transition-fast);
}

.sympathico-lang-btn.active {
    background: var(--symp-gradient-main);
    color: white;
}

.sympathico-lang-btn:hover:not(.active) {
    color: var(--symp-text-primary);
}

/* =========================================
   File Input Hidden
   ========================================= */
.sympathico-file-input {
    display: none;
}

/* =========================================
   Responsive Design
   ========================================= */
/* Tablet breakpoint — keep widget usable between 481-767px */
@media (min-width: 481px) and (max-width: 767px) {
    .sympathico-widget,
    .symp-panel {
        width: calc(100vw - 32px);
        max-width: 480px;
        right: 16px;
        bottom: 80px;
        height: 65vh;
        height: 65dvh;
    }
}

@media (max-width: 480px) {
    .sympathico-fab {
        bottom: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
    }

    .sympathico-widget {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        height: 100dvh;
        max-height: 100%;
        max-height: 100dvh;
        border-radius: 0;
    }

    .sympathico-widget.open {
        border-radius: 0;
    }

    .sympathico-header {
        padding: 12px;
    }

    .sympathico-messages {
        padding: 12px;
    }

    .sympathico-quick-actions {
        padding: 10px 12px;
    }

    .sympathico-quick-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .sympathico-input-area {
        padding: 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .sympathico-message {
        max-width: 90%;
    }

    .symp-message {
        max-width: 90%;
    }

    .symp-message-content {
        max-width: 100%;
    }
}

/* Safe area for iPhone X+ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .sympathico-widget {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* =========================================
   Dark Mode Enhancements
   ========================================= */
@media (prefers-color-scheme: dark) {
    .sympathico-widget {
        background: rgba(10, 10, 20, 0.98);
    }
}

/* =========================================
   Reduced Motion
   ========================================= */
@media (prefers-reduced-motion: reduce) {
    .sympathico-fab,
    .sympathico-widget,
    .sympathico-message,
    .sympathico-quick-btn,
    .sympathico-input-container,
    .sympathico-input-btn,
    .sympathico-form-submit {
        animation: none !important;
        transition: none !important;
    }
}

/* =========================================
   Print Styles
   ========================================= */
@media print {
    .sympathico-fab,
    .sympathico-widget {
        display: none !important;
    }
}

/* =========================================
   High Contrast Mode
   ========================================= */
@media (forced-colors: active) {
    .sympathico-fab,
    .sympathico-widget {
        border: 2px solid currentColor;
    }
    
    .sympathico-input,
    .sympathico-form input,
    .sympathico-form textarea {
        border: 1px solid currentColor;
    }
}

/* =========================================
   Light Theme Specific Overrides
   ========================================= */
[data-theme="light"] .sympathico-widget {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .sympathico-header {
    background: rgba(248, 250, 252, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .sympathico-status h3 {
    color: #0f172a;
    -webkit-text-fill-color: #0f172a;
    background: none;
}

[data-theme="light"] .sympathico-status span {
    color: #64748b;
}

[data-theme="light"] .sympathico-messages {
    background: #f8fafc;
}

[data-theme="light"] .sympathico-message.bot .bubble {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .sympathico-message .bubble strong,
[data-theme="light"] .sympathico-message .bubble b {
    color: #0099cc;
}

[data-theme="light"] .sympathico-message .bubble a {
    color: #0099cc;
}

[data-theme="light"] .sympathico-quick-actions {
    background: rgba(248, 250, 252, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .sympathico-quick-btn {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .sympathico-quick-btn:hover {
    background: #f1f5f9;
    border-color: #0099cc;
    color: #0099cc;
}

[data-theme="light"] .sympathico-input-container {
    background: rgba(248, 250, 252, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .sympathico-input {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .sympathico-input::placeholder {
    color: #94a3b8;
}

[data-theme="light"] .sympathico-input:focus {
    border-color: #0099cc;
    box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.15);
}

[data-theme="light"] .sympathico-typing {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .sympathico-typing-text {
    color: #64748b;
}

[data-theme="light"] .sympathico-form-group label {
    color: #0f172a;
}

[data-theme="light"] .sympathico-form input,
[data-theme="light"] .sympathico-form textarea,
[data-theme="light"] .sympathico-form select {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .sympathico-form input:focus,
[data-theme="light"] .sympathico-form textarea:focus,
[data-theme="light"] .sympathico-form select:focus {
    border-color: #0099cc;
    box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.15);
}

[data-theme="light"] .sympathico-footer {
    background: rgba(248, 250, 252, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .sympathico-footer span {
    color: #64748b;
}

[data-theme="light"] .sympathico-close-btn {
    color: #64748b;
}

[data-theme="light"] .sympathico-close-btn:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.05);
}

/* Light theme FAB - keep it vibrant */
[data-theme="light"] .sympathico-fab {
    box-shadow: 0 4px 20px rgba(0, 153, 204, 0.3), 0 8px 30px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .sympathico-fab:hover {
    box-shadow: 0 6px 25px rgba(0, 153, 204, 0.4), 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* =========================================
   Class Aliases (symp-* to sympathico-*)
   The JS uses symp-* classes, CSS uses sympathico-*
   ========================================= */

/* Header aliases */
.symp-header { display: flex; align-items: center; justify-content: space-between; padding: 10px var(--symp-spacing); background: var(--symp-bg-glass); border-bottom: var(--symp-border-subtle); backdrop-filter: blur(10px); flex-shrink: 0; position: relative; overflow: hidden; }
.symp-header-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.symp-header-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.symp-header-actions { display: flex; gap: 4px; flex-shrink: 0; }
.symp-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: inline-block; transition: transform 0.3s ease; flex-shrink: 0; }
.symp-avatar.symp-thinking { animation: symp-spin 1.5s linear infinite; }
.symp-title { font-size: 15px; font-weight: 600; color: var(--symp-text-primary); margin: 0; background: var(--symp-gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Article 50 AI Disclosure Badge */
.symp-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--symp-warning);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 6px;
    padding: 2px 7px;
    width: fit-content;
    cursor: help;
    transition: var(--symp-transition-fast);
}
.symp-ai-badge svg {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    color: var(--symp-warning);
    animation: symp-ai-badge-pulse 3s ease-in-out infinite;
}
.symp-ai-badge:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.5);
}
@keyframes symp-ai-badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
[data-theme="light"] .symp-ai-badge {
    color: #b45309;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(180, 83, 9, 0.25);
}
[data-theme="light"] .symp-ai-badge svg {
    color: #b45309;
}

.symp-status { font-size: 12px; color: var(--symp-neon-green); display: flex; align-items: center; gap: 6px; }
.symp-status-dot { width: 6px; height: 6px; background: var(--symp-neon-green); border-radius: 50%; animation: sympathico-pulse 1.5s infinite; }

/* Icon button */
.symp-icon-btn { width: 36px; height: 36px; border-radius: 10px; border: var(--symp-border-subtle); background: var(--symp-bg-glass-light); color: var(--symp-text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--symp-transition-fast); }
.symp-icon-btn:hover { background: rgba(0, 207, 255, 0.2); color: var(--symp-neon-cyan); border-color: rgba(0, 207, 255, 0.4); }
.symp-icon-btn svg { width: 16px; height: 16px; }

/* Messages container */
.symp-messages { flex: 1; overflow-y: auto; overflow-x: hidden; padding: var(--symp-spacing); display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.symp-messages::-webkit-scrollbar { width: 4px; }
.symp-messages::-webkit-scrollbar-track { background: transparent; }
.symp-messages::-webkit-scrollbar-thumb { background: rgba(0, 207, 255, 0.3); border-radius: 4px; }

/* Typing indicator */
.symp-typing { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--symp-bg-glass); border: 1px solid rgba(0, 207, 255, 0.12); border-radius: 16px; border-bottom-left-radius: 4px; width: fit-content; backdrop-filter: blur(16px); box-shadow: 0 0 20px rgba(0, 207, 255, 0.06); animation: symp-typing-breathe 2s ease-in-out infinite; }
@keyframes symp-typing-breathe { 0%, 100% { box-shadow: 0 0 20px rgba(0, 207, 255, 0.06); } 50% { box-shadow: 0 0 30px rgba(0, 207, 255, 0.15); } }
.symp-typing-icon { width: 24px; height: 24px; flex-shrink: 0; animation: symp-spin 1.5s linear infinite; }
.symp-typing-icon img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.symp-typing-text { font-size: 13px; color: var(--symp-neon-cyan); font-style: italic; opacity: 0.9; animation: symp-pulse-text 2s ease-in-out infinite; }
@keyframes symp-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes symp-pulse-text { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

/* Consent prompt */
.symp-consent-content { font-size: 13px; }
.symp-consent-content p { margin: 0 0 10px 0; opacity: 0.85; }
.symp-consent-actions { display: flex; gap: 8px; }
.symp-consent-btn { padding: 6px 14px; border-radius: 16px; font-size: 12px; cursor: pointer; transition: var(--symp-transition-fast); border: none; }
.symp-consent-yes { background: rgba(0, 207, 255, 0.2); color: var(--symp-neon-cyan); }
.symp-consent-yes:hover { background: rgba(0, 207, 255, 0.35); }
.symp-consent-no { background: var(--symp-bg-glass-light); color: var(--symp-text-muted); }
.symp-consent-no:hover { background: rgba(255, 255, 255, 0.1); }
[data-theme="light"] .symp-consent-yes { background: #e0f2fe; color: #0284c7; }
[data-theme="light"] .symp-consent-no { background: #f1f5f9; color: #64748b; }

/* Quick actions — 2×2 compact grid */
.symp-quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 var(--symp-spacing) 10px; }
.symp-quick-action { padding: 6px 10px; background: var(--symp-bg-glass-light); border: var(--symp-border-subtle); border-radius: 10px; color: var(--symp-text-secondary); font-size: 11px; cursor: pointer; transition: var(--symp-transition-fast); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; justify-content: center; overflow: hidden; text-overflow: ellipsis; }
.symp-quick-action:hover { background: rgba(0, 207, 255, 0.15); border-color: rgba(0, 207, 255, 0.4); color: var(--symp-neon-cyan); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0, 207, 255, 0.2); }
.symp-qa-icon { display: inline-flex; align-items: center; flex-shrink: 0; opacity: 0.7; }
.symp-qa-icon svg { width: 12px; height: 12px; }
.symp-quick-action:hover .symp-qa-icon { opacity: 1; }
.symp-qa-label { line-height: 1; overflow: hidden; text-overflow: ellipsis; }
[data-theme="light"] .symp-quick-action { background: #f1f5f9; border-color: rgba(0, 0, 0, 0.1); color: #334155; }
[data-theme="light"] .symp-quick-action:hover { background: rgba(0, 153, 180, 0.1); border-color: rgba(0, 153, 180, 0.3); color: #0099b4; }

/* Input area */
.symp-input-area { display: flex; align-items: center; gap: 8px; padding: var(--symp-spacing); border-top: var(--symp-border-subtle); background: var(--symp-bg-glass); flex-shrink: 0; min-width: 0; overflow: hidden; }
.symp-input-wrapper { flex: 1; display: flex; align-items: center; background: var(--symp-bg-dark); border: var(--symp-border-subtle); border-radius: 12px; padding: 10px 14px; transition: var(--symp-transition-fast); min-height: 44px; min-width: 0; overflow: hidden; }
.symp-input-wrapper:focus-within { border-color: var(--symp-neon-cyan); box-shadow: 0 0 15px rgba(0, 207, 255, 0.2); }
.symp-input { flex: 1; background: transparent; border: none; color: var(--symp-text-primary); font-size: 15px; outline: none; padding: 6px 0; min-width: 0; }
.symp-input::placeholder { color: var(--symp-text-muted); }

/* Voice button */
.symp-voice-btn { background: transparent; border: none; color: var(--symp-text-secondary); cursor: pointer; padding: 4px; display: flex; align-items: center; justify-content: center; transition: var(--symp-transition-fast); }
.symp-voice-btn:hover { color: var(--symp-neon-cyan); }
.symp-voice-btn.recording { color: var(--symp-neon-pink); animation: pulse-recording 1s infinite; }
@keyframes pulse-recording { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* File button */
.symp-file-btn { flex-shrink: 0; }

/* Send button */
.symp-send-btn { width: 40px; height: 40px; border-radius: 12px; background: var(--symp-gradient-main); border: none; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--symp-transition); flex-shrink: 0; }
.symp-send-btn:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(0, 207, 255, 0.4); }
.symp-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.symp-send-btn svg { width: 18px; height: 18px; }

/* Voice status */
.symp-voice-status { display: flex; align-items: center; justify-content: center; gap: 12px; padding: var(--symp-spacing); background: var(--symp-bg-glass); border-top: var(--symp-border-subtle); }
.symp-voice-visualizer { display: flex; align-items: center; gap: 3px; height: 24px; }
.symp-voice-bar { width: 3px; height: 100%; background: var(--symp-neon-cyan); border-radius: 2px; animation: voice-bar 0.5s ease-in-out infinite alternate; }
.symp-voice-bar:nth-child(1) { animation-delay: 0s; }
.symp-voice-bar:nth-child(2) { animation-delay: 0.1s; }
.symp-voice-bar:nth-child(3) { animation-delay: 0.2s; }
.symp-voice-bar:nth-child(4) { animation-delay: 0.3s; }
.symp-voice-bar:nth-child(5) { animation-delay: 0.4s; }
@keyframes voice-bar { from { height: 30%; } to { height: 100%; } }

/* Message bubbles */
.symp-message { display: flex; flex-direction: column; max-width: 85%; min-width: 0; overflow: visible; animation: symp-msg-slide-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.symp-message.symp-message-user { align-self: flex-end; animation: symp-msg-slide-right 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.symp-message.symp-message-bot { align-self: flex-start; flex-direction: row; flex-wrap: wrap; align-items: flex-start; animation: symp-msg-slide-left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

@keyframes symp-msg-slide-left {
    0% { opacity: 0; transform: translateX(-20px) scale(0.95); filter: blur(3px); }
    60% { filter: blur(0); }
    100% { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}
@keyframes symp-msg-slide-right {
    0% { opacity: 0; transform: translateX(20px) scale(0.95); filter: blur(3px); }
    60% { filter: blur(0); }
    100% { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}
.symp-message .bubble { padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.symp-message.user .bubble { background: var(--symp-gradient-main); color: white; border-bottom-right-radius: 4px; }
.symp-message.symp-message-bot .bubble,
.symp-message-bot .symp-message-content { background: var(--symp-bg-glass); color: var(--symp-text-primary); border: 1px solid rgba(0, 207, 255, 0.12); border-bottom-left-radius: 4px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 0 20px rgba(0, 207, 255, 0.06), inset 0 0 30px rgba(0, 207, 255, 0.03); transition: box-shadow 0.3s ease, border-color 0.3s ease; }
.symp-message-bot .symp-message-content:hover { border-color: rgba(0, 207, 255, 0.25); box-shadow: 0 0 25px rgba(0, 207, 255, 0.12), inset 0 0 30px rgba(0, 207, 255, 0.05); }
.symp-message-content { padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.5; word-wrap: break-word; overflow-wrap: anywhere; word-break: break-word; min-width: 0; overflow: visible; background: var(--symp-bg-glass); color: var(--symp-text-primary); border: 1px solid rgba(0, 207, 255, 0.12); border-bottom-left-radius: 4px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 0 20px rgba(0, 207, 255, 0.06), inset 0 0 30px rgba(0, 207, 255, 0.03); transition: box-shadow 0.3s ease, border-color 0.3s ease; }
.symp-message-user .symp-message-content { background: var(--symp-gradient-main); color: white; border: none; border-bottom-right-radius: 4px; border-bottom-left-radius: 16px; box-shadow: 0 4px 20px rgba(0, 207, 255, 0.25); backdrop-filter: none; }
@keyframes message-in {
    0% { opacity: 0; transform: translateY(16px) scale(0.95); filter: blur(3px); }
    60% { opacity: 1; filter: blur(0); }
    80% { transform: translateY(-2px) scale(1.01); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* Message avatar in chat */
.symp-message-avatar {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-right: 8px;
}

.symp-message-avatar img {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* Light theme aliases */
[data-theme="light"] .symp-panel { background: #ffffff; border-color: rgba(0, 153, 180, 0.2); }
[data-theme="light"] .symp-header { background: rgba(248, 250, 252, 0.9); border-color: rgba(0, 0, 0, 0.1); }
[data-theme="light"] .symp-title { color: #0f172a; -webkit-text-fill-color: unset; background: none; }
[data-theme="light"] .symp-icon-btn { background: rgba(0, 0, 0, 0.05); border-color: rgba(0, 0, 0, 0.1); color: #334155; }
[data-theme="light"] .symp-icon-btn:hover { background: rgba(0, 153, 180, 0.1); color: #0099b4; }
[data-theme="light"] .symp-input-wrapper { background: #f8fafc; border-color: rgba(0, 0, 0, 0.1); }
[data-theme="light"] .symp-input { color: #0f172a; }
[data-theme="light"] .symp-input::placeholder { color: #94a3b8; }
[data-theme="light"] .symp-input-area { background: rgba(248, 250, 252, 0.9); border-color: rgba(0, 0, 0, 0.1); }
[data-theme="light"] .symp-message.bot .bubble,
[data-theme="light"] .symp-message-bot .symp-message-content { background: #f1f5f9; color: #0f172a; border-color: rgba(0, 0, 0, 0.1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }
[data-theme="light"] .symp-messages::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2); }
/* Light theme — segmented control */
[data-theme="light"] .symp-audit-toggle::before { background: #f1f5f9; border-color: rgba(0, 0, 0, 0.1); }
[data-theme="light"] .symp-audit-toggle button { color: #64748b; }
[data-theme="light"] .symp-audit-toggle button:hover { color: #0f172a; }
[data-theme="light"] .symp-audit-toggle button.active { background: linear-gradient(135deg, #0099cc, #4f46e5); color: #fff; box-shadow: 0 2px 8px rgba(0, 153, 204, 0.25); }
/* Light theme — feedback */
[data-theme="light"] .symp-feedback-btn svg { stroke: #94a3b8; }
[data-theme="light"] .symp-feedback-btn:hover svg { stroke: #0099b4; }
[data-theme="light"] .symp-feedback-btn.selected svg { stroke: #0099b4; }

/* =========================================
   EU AI Act Audit Components
   ========================================= */

/* Audit Mode Toggle — Segmented Control */
.symp-audit-toggle {
    display: flex;
    position: relative;
    gap: 0;
    padding: 0 var(--symp-spacing);
    margin-bottom: 12px;
}

.symp-audit-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--symp-spacing);
    right: var(--symp-spacing);
    bottom: 0;
    background: var(--symp-bg-glass-light);
    border: var(--symp-border-subtle);
    border-radius: 12px;
    pointer-events: none;
}

.symp-audit-toggle button {
    flex: 1;
    position: relative;
    z-index: 1;
    padding: 9px 12px;
    border-radius: 10px;
    border: 2px solid transparent;
    background: transparent;
    color: var(--symp-text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 3px;
}

.symp-audit-toggle button:hover {
    color: var(--symp-text-primary);
}

.symp-audit-toggle button.active {
    background: linear-gradient(135deg, var(--symp-primary), var(--symp-accent), var(--symp-secondary), var(--symp-primary));
    background-size: 300% 300%;
    animation: symp-gradient-shift 4s ease infinite;
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 12px rgba(0, 207, 255, 0.3);
}

@keyframes symp-gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* EU AI Audit button — animated gold shimmer */
.symp-audit-toggle button[data-mode="flash_audit"] {
    color: var(--symp-text-muted);
}
.symp-audit-toggle button[data-mode="flash_audit"].active {
    background: linear-gradient(135deg, #1a1a5e, #003399, #1a1a5e, #003399);
    background-size: 300% 300%;
    animation: symp-gradient-shift 4s ease infinite;
    border-color: transparent;
    color: #FFD700;
    box-shadow: 0 2px 16px rgba(0, 51, 153, 0.5), 0 0 30px rgba(255, 215, 0, 0.15);
    position: relative;
    overflow: hidden;
}
.symp-audit-toggle button[data-mode="flash_audit"].active .symp-mode-text {
    background: linear-gradient(90deg, #FFD700, #FFFACD, #FFD700);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: symp-gold-shimmer 3s linear infinite;
}
.symp-audit-toggle button[data-mode="flash_audit"].active .symp-mode-icon svg {
    stroke: #FFD700;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5));
}
.symp-audit-toggle button[data-mode="flash_audit"].active::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    transform: skewX(-25deg);
    animation: symp-shimmer-sweep 3s ease-in-out infinite;
}

@keyframes symp-gold-shimmer {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

@keyframes symp-shimmer-sweep {
    0%, 100% { left: -60%; opacity: 0; }
    10% { opacity: 1; }
    40% { left: 120%; opacity: 1; }
    50%, 100% { left: 120%; opacity: 0; }
}

/* Light theme EU button */
[data-theme="light"] .symp-audit-toggle button[data-mode="flash_audit"].active {
    background: linear-gradient(135deg, #003399, #1a237e, #003399);
    background-size: 300% 300%;
    animation: symp-gradient-shift 4s ease infinite;
    color: #FFD700;
    box-shadow: 0 2px 10px rgba(0, 51, 153, 0.35);
}

.symp-mode-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.symp-mode-icon svg {
    width: 15px;
    height: 15px;
}

.symp-mode-text {
    white-space: nowrap;
}

/* Remove old urgent shimmer — no longer needed */
.symp-audit-toggle button.urgent::before {
    display: none;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Audit Progress Bar */
.symp-audit-progress {
    padding: 0 var(--symp-spacing) 12px;
}

.symp-progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(0, 207, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.symp-progress-bar {
    height: 100%;
    background: var(--symp-gradient-main);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(0, 207, 255, 0.5);
}

.symp-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--symp-text-muted);
    font-weight: 600;
}

.symp-progress-text span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.symp-progress-text .current {
    color: var(--symp-neon-cyan);
}

/* Audit Question Display */
.symp-audit-question {
    padding: 16px;
    background: var(--symp-bg-glass);
    border: var(--symp-border-glow);
    border-radius: 16px;
    margin: 0 var(--symp-spacing) 12px;
}

.symp-audit-question-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.symp-audit-question-number {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--symp-neon-cyan);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.symp-audit-urgency {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.symp-audit-urgency.critical {
    background: rgba(239, 68, 68, 0.15);
    color: var(--symp-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.symp-audit-urgency.high {
    background: rgba(245, 158, 11, 0.15);
    color: var(--symp-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.symp-audit-urgency.medium {
    background: rgba(139, 92, 246, 0.15);
    color: var(--symp-accent);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.symp-audit-urgency.contextual,
.symp-audit-urgency.administrative {
    background: rgba(0, 207, 255, 0.15);
    color: var(--symp-primary);
    border: 1px solid rgba(0, 207, 255, 0.3);
}

.symp-audit-question-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--symp-text-primary);
    font-weight: 500;
    margin-bottom: 12px;
}

.symp-audit-question-area {
    font-size: 12px;
    color: var(--symp-text-muted);
    margin-bottom: 16px;
}

/* Audit Answer Options */
.symp-audit-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.symp-audit-option {
    padding: 12px 16px;
    background: var(--symp-bg-glass-light);
    border: var(--symp-border-subtle);
    border-radius: 12px;
    color: var(--symp-text-primary);
    cursor: pointer;
    transition: var(--symp-transition-fast);
    text-align: left;
    font-size: 13px;
    font-weight: 500;
}

.symp-audit-option:hover {
    background: rgba(0, 207, 255, 0.15);
    border-color: rgba(0, 207, 255, 0.4);
    color: var(--symp-neon-cyan);
    transform: translateX(4px);
}

.symp-audit-option.selected {
    background: var(--symp-gradient-main);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 15px rgba(0, 207, 255, 0.3);
}

/* Yes/No/Unsure buttons */
.symp-audit-yn-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.symp-audit-yn-option {
    padding: 12px;
    background: var(--symp-bg-glass-light);
    border: var(--symp-border-subtle);
    border-radius: 12px;
    color: var(--symp-text-primary);
    cursor: pointer;
    transition: var(--symp-transition-fast);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.symp-audit-yn-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.symp-audit-yn-option.yes {
    border-color: rgba(16, 185, 129, 0.3);
}

.symp-audit-yn-option.yes:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.5);
    color: var(--symp-success);
}

.symp-audit-yn-option.no {
    border-color: rgba(239, 68, 68, 0.3);
}

.symp-audit-yn-option.no:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    color: var(--symp-danger);
}

.symp-audit-yn-option.unsure {
    border-color: rgba(245, 158, 11, 0.3);
}

.symp-audit-yn-option.unsure:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.5);
    color: var(--symp-warning);
}

/* Text Input for Administrative Questions */
.symp-audit-text-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.symp-audit-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--symp-bg-glass-light);
    border: var(--symp-border-subtle);
    border-radius: 12px;
    color: var(--symp-text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--symp-transition-fast);
}

.symp-audit-input:focus {
    outline: none;
    border-color: var(--symp-neon-cyan);
    box-shadow: 0 0 0 3px rgba(0, 207, 255, 0.1);
}

.symp-audit-input::placeholder {
    color: var(--symp-text-secondary);
}

.symp-audit-submit-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--symp-neon-cyan), var(--symp-neon-green));
    border: none;
    border-radius: 12px;
    color: var(--symp-bg-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--symp-transition-fast);
    white-space: nowrap;
}

.symp-audit-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 207, 255, 0.4);
}

/* Audit Report */
.symp-audit-report {
    padding: 20px;
    background: var(--symp-bg-glass);
    border: var(--symp-border-glow);
    border-radius: 16px;
    margin: 0 var(--symp-spacing) 12px;
    max-height: 400px;
    overflow-y: auto;
}

.symp-audit-report h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--symp-text-primary);
    margin: 0 0 16px;
    background: var(--symp-gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.symp-audit-report h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--symp-text-primary);
    margin: 16px 0 8px;
}

.symp-audit-report p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--symp-text-secondary);
    margin: 8px 0;
}

.symp-audit-report ul {
    margin: 8px 0;
    padding-left: 20px;
}

.symp-audit-report li {
    font-size: 13px;
    line-height: 1.6;
    color: var(--symp-text-secondary);
    margin: 4px 0;
}

.symp-audit-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    background: rgba(0, 207, 255, 0.1);
    border: 2px solid;
    border-radius: 16px;
    margin: 16px 0;
}

.symp-audit-score-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.symp-audit-score-label {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Email Report Button */
.symp-email-report-btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--symp-gradient-premium);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--symp-transition);
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.symp-email-report-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

.symp-email-report-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.symp-email-report-btn svg {
    width: 18px;
    height: 18px;
}

.symp-email-report-btn .symp-spinner {
    animation: symp-spin 1s linear infinite;
}

@keyframes symp-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Package Cards */
.symp-packages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.symp-package-card {
    padding: 16px;
    background: var(--symp-bg-glass-light);
    border: var(--symp-border-subtle);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--symp-transition-fast);
}

.symp-package-card:hover {
    background: rgba(0, 207, 255, 0.1);
    border-color: rgba(0, 207, 255, 0.4);
    transform: translateX(4px);
}

.symp-package-card.popular {
    border-color: var(--symp-gold);
    position: relative;
    overflow: hidden;
}

.symp-package-card.popular::before {
    content: '★ MOST POPULAR';
    position: absolute;
    top: 8px;
    right: -30px;
    background: var(--symp-gradient-premium);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 4px 40px;
    transform: rotate(45deg);
    letter-spacing: 0.5px;
}

.symp-package-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.symp-package-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--symp-text-primary);
}

.symp-package-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--symp-neon-cyan);
}

.symp-package-target {
    font-size: 12px;
    color: var(--symp-text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.symp-package-details {
    font-size: 11px;
    color: var(--symp-text-muted);
    line-height: 1.5;
}

/* Light theme adjustments */
[data-theme="light"] .symp-audit-question {
    background: #f8fafc;
    border-color: rgba(0, 153, 180, 0.2);
}

[data-theme="light"] .symp-audit-option {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .symp-audit-option:hover {
    background: rgba(0, 153, 180, 0.1);
    border-color: rgba(0, 153, 180, 0.3);
    color: #0099b4;
}

[data-theme="light"] .symp-package-card {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .symp-package-card:hover {
    background: rgba(0, 153, 180, 0.05);
    border-color: rgba(0, 153, 180, 0.3);
}

/* =========================================
   Feedback Thumbs
   ========================================= */
.symp-feedback {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    margin-left: 36px;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.symp-message-bot:hover .symp-feedback,
.symp-feedback.voted { opacity: 1; }
.symp-feedback-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    color: var(--symp-text-muted);
    transition: var(--symp-transition-fast);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.symp-feedback-btn svg {
    width: 14px;
    height: 14px;
}
.symp-feedback-btn:hover { background: rgba(0, 207, 255, 0.15); border-color: rgba(0, 207, 255, 0.3); }
.symp-feedback-btn.selected { background: rgba(0, 207, 255, 0.25); border-color: var(--symp-primary); color: var(--symp-primary); }
[data-theme="light"] .symp-feedback-btn { border-color: rgba(0,0,0,0.1); color: #94a3b8; }
[data-theme="light"] .symp-feedback-btn:hover { background: rgba(0, 153, 180, 0.1); }
[data-theme="light"] .symp-feedback-btn.selected { background: rgba(0, 153, 180, 0.15); border-color: #0099b4; color: #0099b4; }

/* =========================================
   Handoff Banner
   ========================================= */
.symp-handoff-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin: 8px 16px;
    background: linear-gradient(135deg, rgba(0, 207, 255, 0.15), rgba(99, 102, 241, 0.15));
    border: 1px solid rgba(0, 207, 255, 0.3);
    border-radius: 12px;
    animation: symp-handoff-glow 2s ease-in-out infinite alternate;
}
@keyframes symp-handoff-glow {
    from { box-shadow: 0 0 8px rgba(0, 207, 255, 0.1); }
    to { box-shadow: 0 0 16px rgba(0, 207, 255, 0.25); }
}
.symp-handoff-banner a {
    color: var(--symp-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}
.symp-handoff-banner a:hover { text-decoration: underline; }
.symp-handoff-text { font-size: 12px; color: var(--symp-text-secondary); line-height: 1.4; }
[data-theme="light"] .symp-handoff-banner { background: linear-gradient(135deg, rgba(0, 153, 180, 0.08), rgba(99, 102, 241, 0.08)); border-color: rgba(0, 153, 180, 0.25); }

/* =========================================
   Export Button
   ========================================= */
.symp-export-btn {
    background: none;
    border: none;
    color: var(--symp-text-muted);
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    border-radius: 6px;
    transition: var(--symp-transition-fast);
}
.symp-export-btn:hover { color: var(--symp-primary); background: rgba(0, 207, 255, 0.1); }