/* Modern Glassmorphism & High-Contrast Design System for Astana Vent Voice AI */
:root {
    --astana-primary: #0ea5e9;
    --astana-primary-hover: #0284c7;
    --astana-secondary: #6366f1;
    --astana-emerald: #10b981;
    --astana-dark-slate: #0f172a;
    --astana-body-slate: #334155; /* Slate-700 as required by RULE[user_global] */
    --astana-light-bg: #f8fafc;
    --astana-border: #e2e8f0;
    --astana-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --astana-glow: 0 0 20px rgba(14, 165, 233, 0.4);
    --astana-font-stack: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Floating AI Button */
.astana-voice-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999990;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 12px 14px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    box-shadow: var(--astana-shadow-lg), var(--astana-glow);
    cursor: pointer;
    font-family: var(--astana-font-stack);
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.astana-voice-trigger:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 25px 30px -5px rgba(14, 165, 233, 0.35);
    border-color: rgba(14, 165, 233, 0.5);
}

.astana-trigger-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--astana-primary), var(--astana-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.astana-trigger-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.astana-trigger-pulse {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid var(--astana-primary);
    animation: astanaPulse 2s infinite;
}

@keyframes astanaPulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

.astana-badge-online {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--astana-emerald);
    margin-right: 6px;
}

/* Expanded Voice Modal Panel */
.astana-voice-modal {
    position: fixed;
    bottom: 90px;
    right: 24px;
    z-index: 999995;
    width: 400px;
    max-width: calc(100vw - 32px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--astana-font-stack);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.astana-voice-modal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Modal Header */
.astana-modal-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.astana-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.astana-avatar-ai {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--astana-primary), var(--astana-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
}

.astana-header-title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.astana-header-title p {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
}

.astana-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.astana-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Visualizer Wave Container */
.astana-visualizer-container {
    height: 100px;
    background: #0f172a;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.astana-canvas-wave {
    width: 100%;
    height: 100%;
    display: block;
}

.astana-status-overlay {
    position: absolute;
    bottom: 8px;
    padding: 4px 12px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 9999px;
    color: #38bdf8;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* Chat Transcript Window */
.astana-transcript-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}

.astana-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--astana-body-slate); /* Slate-700 contrast */
}

.astana-msg strong {
    color: #0f172a;
    font-weight: 700;
}

.astana-msg.ai {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.astana-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--astana-primary), #0284c7);
    color: #ffffff;
    border-top-right-radius: 4px;
}

.astana-msg.user strong {
    color: #ffffff;
}

/* Quick Action Pills */
.astana-quick-actions {
    padding: 8px 16px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
}

.astana-quick-pill {
    padding: 6px 12px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.astana-quick-pill:hover {
    background: #e0f2fe;
    color: var(--astana-primary);
    border-color: #bae6fd;
}

/* Input Toolbar */
.astana-input-toolbar {
    padding: 12px 16px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.astana-text-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.astana-text-input:focus {
    border-color: var(--astana-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.astana-mic-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--astana-primary), var(--astana-secondary));
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.astana-mic-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.astana-mic-btn.active {
    background: #ef4444;
    animation: astanaMicPulse 1.5s infinite;
}

@keyframes astanaMicPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.astana-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #0f172a;
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.astana-send-btn:hover {
    background: var(--astana-primary);
}

/* Lead Capture Card Modal */
.astana-lead-form-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.astana-lead-form-modal.active {
    opacity: 1;
    pointer-events: all;
}

.astana-lead-card {
    background: #ffffff;
    width: 100%;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.astana-lead-card h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #0f172a;
}

.astana-lead-card p {
    margin: 0 0 16px 0;
    font-size: 13px;
    color: var(--astana-body-slate); /* Slate-700 */
}

.astana-lead-card input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 14px;
}

.astana-lead-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--astana-primary), #0284c7);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.astana-lead-submit-btn:hover {
    opacity: 0.95;
}

.astana-lead-close {
    margin-top: 10px;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
}
