/* AI Voice Support Widget Styles */
:root {
    --ai-primary: #f7931e;
    --ai-purple: #7b61ff;
    --ai-purple-light: #9d88ff;
    --ai-bg: #1a1a2e;
    --ai-glass: rgba(26, 26, 46, 0.85);
    --ai-text: #ffffff;
    --ai-secondary: rgba(247, 147, 30, 0.2);
}

#ai-voice-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#ai-voice-modal.active {
    display: flex;
    opacity: 1;
}

.ai-modal-content {
    background: var(--ai-glass);
    width: 80%;
    max-width: 450px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
    color: var(--ai-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#ai-voice-modal.active .ai-modal-content {
    transform: scale(1);
}

.ai-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--ai-purple-light);
}

.ai-close-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 24px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.ai-close-btn:hover {
    opacity: 1;
}

.ai-body {
    padding: 40px 24px;
    text-align: center;
}

.ai-visualizer-container {
    width: 100%;
    height: 120px;
    margin-bottom: 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#ai-visualizer-canvas {
    width: 100%;
    height: 100%;
}

.ai-status-container {
    margin-bottom: 32px;
}

.ai-status-text {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
}

.ai-status-subtext {
    font-size: 14px;
    opacity: 0.5;
}

.ai-pulse {
    width: 80px;
    height: 80px;
    background: var(--ai-purple);
    border-radius: 50%;
    position: absolute;
    z-index: -1;
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.3s;
}

.ai-listening .ai-pulse {
    opacity: 0.4;
    animation: ai-pulse-glow 2s infinite;
}

@keyframes ai-pulse-glow {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.2;
    }

    100% {
        transform: scale(1);
        opacity: 0.4;
    }
}

.ai-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.ai-btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.ai-btn-primary {
    background: var(--ai-purple);
    color: #fff;
}

.ai-btn-primary:hover {
    background: var(--ai-purple-light);
    transform: translateY(-2px);
}

.ai-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.ai-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.ai-btn-danger {
    background: #ff4d4d;
    color: #fff;
}

.ai-footer {
    padding: 16px;
    text-align: center;
    font-size: 12px;
}

.ai-footer a {
    color: var(--ai-purple-light);
    text-decoration: none;
    opacity: 0.8;
}

.ai-footer a:hover {
    text-decoration: underline;
    opacity: 1;
}

/* Float trigger button */
.ai-trigger-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ai-label-pill {
    background: linear-gradient(135deg, var(--ai-purple-light), var(--ai-purple));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(123, 97, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ai-label-pill i {
    font-size: 16px;
}

.ai-trigger-fab {
    width: 100px;
    height: 100px;
    background: var(--ai-purple);
    border-radius: 50%;
    border: 4px solid rgba(123, 97, 255, 0.3);
    padding: 0;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(123, 97, 255, 0.4);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-trigger-fab img {
    width: 80%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transform: scale(1.4);
    /* Safe centered bust view */
    margin-top: 50px;
    transition: transform 0.3s;
}

.ai-trigger-fab:hover {
    box-shadow: 0 15px 40px rgba(123, 97, 255, 0.5);
}

.ai-trigger-fab:hover img {
    /* No change on hover to keep scale fixed */
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}