/* =====================================================
   WIZ AI — DYNAMIC ISLAND PILL + MODAL SYSTEM
   ===================================================== */

/* Hidden utility — does NOT use display:none so animations work */
.wizm-ai-hidden {
    pointer-events: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ── FLOATING PILL (the seed / Dynamic Island) ── */
#wizm-ai-pill {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px 9px 14px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    border-radius: 999px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.08);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    /* entrance */
    animation: wizm-pill-enter 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

#wizm-ai-pill:hover {
    box-shadow: 0 8px 32px rgba(16, 153, 87, 0.45), 0 0 0 1.5px rgba(16,153,87,0.5);
}

#wizm-ai-pill .wizm-pill-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #109957;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(16,153,87,0.25);
    animation: wizm-pill-pulse 2.4s ease-in-out infinite;
}

#wizm-ai-pill .wizm-pill-icon i,
#wizm-ai-pill .wizm-pill-icon img {
    color: #fff;
    font-size: 12px;
    width: 14px;
    height: 14px;
    object-fit: cover;
    border-radius: 50%;
}

#wizm-ai-pill .wizm-pill-label {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.01em;
    transition: opacity 0.3s ease, max-width 0.4s ease;
    overflow: hidden;
    max-width: 200px;
}

#wizm-ai-pill .wizm-pill-chevron {
    font-size: 10px;
    color: #94a3b8;
    margin-left: 2px;
    transition: transform 0.3s ease;
}

@keyframes wizm-pill-enter {
    0%   { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(0.6); }
    60%  { opacity: 1; transform: translateX(-50%) translateY(6px) scale(1.05); }
    80%  { transform: translateX(-50%) translateY(-3px) scale(0.97); }
    100% { transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes wizm-pill-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(16,153,87,0.25); }
    50%       { box-shadow: 0 0 0 7px rgba(16,153,87,0.0); }
}

/* When pill is active (modal open), hide it upward */
#wizm-ai-pill.wizm-pill-expanded {
    animation: wizm-pill-expand 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards !important;
    pointer-events: none;
}

@keyframes wizm-pill-expand {
    0%   { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
    40%  { transform: translateX(-50%) translateY(10px) scale(1.12, 0.85); opacity: 1; }
    100% { transform: translateX(-50%) translateY(-80px) scale(0.3, 0.2); opacity: 0; }
}

#wizm-ai-pill.wizm-pill-collapsed {
    animation: wizm-pill-collapse 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
    pointer-events: auto;
}

@keyframes wizm-pill-collapse {
    0%   { transform: translateX(-50%) translateY(-80px) scale(0.3, 0.2); opacity: 0; }
    60%  { transform: translateX(-50%) translateY(6px) scale(1.05); opacity: 1; }
    80%  { transform: translateX(-50%) translateY(-2px) scale(0.97); }
    100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

/* ── MODAL OVERLAY ── */
#wizm-ai-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: system-ui, -apple-system, sans-serif;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

#wizm-ai-modal.wizm-ai-open {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.35s ease, visibility 0s linear 0s;
}

.wizm-ai-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 18, 35, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

#wizm-ai-modal.wizm-ai-open .wizm-ai-backdrop {
    opacity: 1;
}

/* ── MODAL CONTAINER — clip-path pill bloom (no content distortion) ── */
.wizm-ai-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 80vh;
    max-height: 900px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 20px;
    /* default resting state — fully hidden as a tiny pill via clip-path */
    clip-path: inset(50% 47% round 999px);
    opacity: 0;
    transform: translateY(-28px);
    will-change: clip-path, transform, opacity;
}

/* OPEN — pill blooms into full modal */
#wizm-ai-modal.wizm-ai-open .wizm-ai-container {
    animation: wizm-bloom-open 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* CLOSE — modal pinches back to pill and rises */
#wizm-ai-modal.wizm-ai-closing .wizm-ai-container {
    animation: wizm-bloom-close 0.38s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards;
}

/* ─── OPEN keyframe: drop in as pill → squash → bloom ─── */
@keyframes wizm-bloom-open {
    /* starts as a tiny pill high above center */
    0% {
        clip-path: inset(50% 47% round 999px);
        transform: translateY(-30px);
        opacity: 0;
    }
    /* pill arrives — visible capsule */
    14% {
        clip-path: inset(48% 33% round 999px);
        transform: translateY(0);
        opacity: 1;
    }
    /* squash wide on "landing" */
    26% {
        clip-path: inset(49% 18% round 999px);
        transform: translateY(8px);
        opacity: 1;
    }
    /* start blooming vertically */
    42% {
        clip-path: inset(38% 8% round 80px);
        transform: translateY(4px);
    }
    /* rapid expansion */
    60% {
        clip-path: inset(8% 1% round 32px);
        transform: translateY(-6px);
    }
    /* slight overshoot */
    78% {
        clip-path: inset(0% 0% round 26px);
        transform: translateY(3px);
    }
    /* settle */
    100% {
        clip-path: inset(0% 0% round 24px);
        transform: translateY(0);
        opacity: 1;
    }
}

/* ─── CLOSE keyframe: bloom → pinch to pill → fly up ─── */
@keyframes wizm-bloom-close {
    0% {
        clip-path: inset(0% 0% round 24px);
        transform: translateY(0);
        opacity: 1;
    }
    40% {
        clip-path: inset(38% 12% round 999px);
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        clip-path: inset(50% 47% round 999px);
        transform: translateY(-30px);
        opacity: 0;
    }
}

/* =====================================================
   MOBILE RESPONSIVE PILL + MOBILE AI BUTTON ANIMATIONS
   ===================================================== */

/* On mobile: pill becomes a compact FAB at bottom-right */
@media (max-width: 767px) {

    /* Pill shrinks to icon-only bubble, moves to bottom-right corner */
    #wizm-ai-pill {
        top: auto;
        bottom: 24px;
        right: 20px;
        left: auto;
        transform: none;
        padding: 12px;
        gap: 0;
        animation: wizm-pill-enter-mobile 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        box-shadow:
            0 6px 28px rgba(16, 153, 87, 0.45),
            0 0 0 1px rgba(255,255,255,0.1);
    }

    /* Hide the label and chevron on mobile */
    #wizm-ai-pill .wizm-pill-label,
    #wizm-ai-pill .wizm-pill-chevron {
        display: none;
    }

    /* Make the icon bigger on mobile FAB */
    #wizm-ai-pill .wizm-pill-icon {
        width: 36px;
        height: 36px;
        background: #109957;
    }

    #wizm-ai-pill .wizm-pill-icon i,
    #wizm-ai-pill .wizm-pill-icon img {
        font-size: 16px;
        width: 18px;
        height: 18px;
    }

    /* Double-ring pulse on mobile for more visibility */
    #wizm-ai-pill .wizm-pill-icon {
        animation: wizm-pill-pulse-mobile 2s ease-in-out infinite;
    }

    /* Pill expanded (modal open) — fly to bottom-right corner upward */
    #wizm-ai-pill.wizm-pill-expanded {
        animation: wizm-pill-expand-mobile 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards !important;
    }

    /* Pill collapsed (modal close) — bounce back from below */
    #wizm-ai-pill.wizm-pill-collapsed {
        animation: wizm-pill-collapse-mobile 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
    }

    /* Mobile modal — full-screen bottom sheet */
    .wizm-ai-container {
        max-width: 100%;
        width: 100%;
        height: 92vh;
        max-height: 92vh;
        margin: 0;
        border-radius: 24px 24px 0 0;
        align-self: flex-end;
    }

    #wizm-ai-modal {
        align-items: flex-end;
    }

    @keyframes wizm-bloom-open {
        0% {
            clip-path: inset(100% 40% 0% 40% round 999px);
            transform: translateY(40px);
            opacity: 0;
        }
        16% {
            clip-path: inset(96% 20% 0% 20% round 999px);
            transform: translateY(0);
            opacity: 1;
        }
        30% {
            clip-path: inset(97% 8% 0% 8% round 999px);
            transform: translateY(6px);
        }
        48% {
            clip-path: inset(60% 2% 0% 2% round 48px);
            transform: translateY(0);
        }
        68% {
            clip-path: inset(12% 0% 0% 0% round 28px);
            transform: translateY(-5px);
        }
        84% {
            clip-path: inset(0% 0% 0% 0% round 26px 26px 0 0);
            transform: translateY(3px);
        }
        100% {
            clip-path: inset(0% 0% 0% 0% round 24px 24px 0 0);
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes wizm-bloom-close {
        0% {
            clip-path: inset(0% 0% 0% 0% round 24px 24px 0 0);
            transform: translateY(0);
            opacity: 1;
        }
        40% {
            clip-path: inset(70% 10% 0% 10% round 999px);
            transform: translateY(0);
            opacity: 1;
        }
        100% {
            clip-path: inset(100% 40% 0% 40% round 999px);
            transform: translateY(40px);
            opacity: 0;
        }
    }
}

/* Mobile FAB keyframes */
@keyframes wizm-pill-enter-mobile {
    0%   { opacity: 0; transform: scale(0.4) translateY(30px); }
    55%  { opacity: 1; transform: scale(1.12) translateY(-4px); }
    75%  { transform: scale(0.95) translateY(2px); }
    90%  { transform: scale(1.04); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes wizm-pill-pulse-mobile {
    0%   { box-shadow: 0 0 0 0 rgba(16,153,87,0.6),  0 0 0 0   rgba(16,153,87,0.3); }
    50%  { box-shadow: 0 0 0 8px rgba(16,153,87,0.0), 0 0 0 14px rgba(16,153,87,0.0); }
    100% { box-shadow: 0 0 0 0 rgba(16,153,87,0.6),  0 0 0 0   rgba(16,153,87,0.3); }
}

@keyframes wizm-pill-expand-mobile {
    0%   { transform: scale(1); opacity: 1; }
    40%  { transform: scale(1.15, 0.85); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}

@keyframes wizm-pill-collapse-mobile {
    0%   { transform: scale(0); opacity: 0; }
    55%  { transform: scale(1.14); opacity: 1; }
    75%  { transform: scale(0.93); }
    90%  { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Mobile header AI button (theme button at top-right) ── */
/* Animated glow ring on the existing mobile header button */
.md\:hidden button[onclick="WizmAI.open()"],
[class*="md:hidden"] button[title="Ask Wiz AI"] {
    position: relative;
    animation: wizm-mobile-btn-enter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    overflow: visible !important;
}

/* Persistent pulsing glow ring */
.md\:hidden button[onclick="WizmAI.open()"]::before,
[class*="md:hidden"] button[title="Ask Wiz AI"]::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid rgba(16, 153, 87, 0.7);
    animation: wizm-header-btn-ring 2s ease-in-out infinite;
    pointer-events: none;
}

/* Tap ripple */
.md\:hidden button[onclick="WizmAI.open()"]::after,
[class*="md:hidden"] button[title="Ask Wiz AI"]::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    transform: scale(0);
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0;
}

.md\:hidden button[onclick="WizmAI.open()"]:active::after,
[class*="md:hidden"] button[title="Ask Wiz AI"]:active::after {
    transform: scale(2.2);
    opacity: 0;
    transition: transform 0s, opacity 0s;
}

@keyframes wizm-mobile-btn-enter {
    0%   { opacity: 0; transform: scale(0.5) rotate(-30deg); }
    60%  { opacity: 1; transform: scale(1.15) rotate(4deg); }
    80%  { transform: scale(0.93) rotate(-2deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes wizm-header-btn-ring {
    0%   { transform: scale(1);    opacity: 0.8; }
    50%  { transform: scale(1.45); opacity: 0;   }
    100% { transform: scale(1);    opacity: 0.8; }
}

/* =====================================================
   MOBILE LAYOUT FIXES
   ===================================================== */
@media (max-width: 767px) {

    /* Header: tighter padding */
    .wizm-ai-header {
        padding: 12px 16px;
    }

    /* Chat area: less padding so messages have room */
    .wizm-ai-chat-area {
        padding: 14px 12px;
        gap: 14px;
    }

    /* Messages: full width on mobile */
    .wizm-ai-message {
        max-width: 95%;
        gap: 10px;
    }

    /* Avatar: slightly smaller */
    .wizm-ai-avatar {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }

    /* Bubble text slightly smaller */
    .wizm-ai-bubble {
        font-size: 14px;
        padding: 10px 14px;
    }

    /* Input area: compact */
    .wizm-ai-input-area {
        padding: 10px 12px;
    }

    /* Input wrapper: tighter */
    .wizm-ai-input-wrapper {
        gap: 6px;
        padding: 7px 8px;
        border-radius: 14px;
    }

    /* Upload + voice buttons: slightly smaller on mobile */
    .wizm-ai-upload-btn,
    .wizm-ai-voice-trigger {
        width: 32px;
        height: 32px;
        padding: 6px;
        font-size: 18px;
    }

    /* Send button: tighter */
    .wizm-ai-send-btn {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    /* Textarea: slightly smaller font */
    #wizm-ai-input {
        font-size: 14px;
        min-height: 32px;
        height: 32px;
    }

    /* Icebreaker section titles */
    .wizm-ai-icebreaker-title {
        margin: 12px 14px 6px 14px;
        font-size: 10px;
    }

    /* Cards: narrower to show ~1.4 cards hinting scroll */
    .wizm-ai-icebreaker-card {
        width: 175px;
        padding: 12px;
    }

    /* Suggestions context tabs: slightly smaller text */
    .wizm-ai-context-tab {
        padding: 7px 14px;
        font-size: 12px;
    }

    /* Footer text */
    .wizm-ai-footer-text {
        font-size: 10px;
    }
}

.wizm-ai-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

.wizm-ai-brand {
    font-weight: 800;
    font-size: 18px;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizm-ai-brand .dashicons {
    color: #8b5cf6;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.wizm-ai-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
    border-radius: 8px;
}
.wizm-ai-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.wizm-ai-chat-area {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #ffffff;
}

.wizm-ai-message {
    display: flex;
    gap: 16px;
    max-width: 85%;
}

.wizm-ai-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.wizm-ai-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wizm-ai-system .wizm-ai-avatar {
    background: #109957;
    color: white;
}
.wizm-ai-user .wizm-ai-avatar {
    background: #10b981;
    color: white;
}

.wizm-ai-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
}
.wizm-ai-system .wizm-ai-bubble {
    background: #f3f4f6;
    color: #1f2937;
    border-top-left-radius: 4px;
}
.wizm-ai-user .wizm-ai-bubble {
    background: #10b981;
    color: #ffffff;
    border-top-right-radius: 4px;
}

.wizm-ai-bubble pre {
    background: #1f2937;
    color: #f3f4f6;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
}
.wizm-ai-bubble code {
    font-family: monospace;
}
.wizm-ai-bubble img {
    max-width: 100%;
    border-radius: 8px;
}

.wizm-ai-input-area {
    padding: 12px 16px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.wizm-ai-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 8px 10px;
    transition: border-color 0.2s;
}
.wizm-ai-input-wrapper:focus-within {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139,92,246,0.1);
}

.wizm-ai-upload-btn {
    cursor: pointer;
    color: #6b7280;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    box-sizing: border-box;
    flex-shrink: 0;
}
.wizm-ai-upload-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

#wizm-ai-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 8px 4px;
    font-size: 15px;
    resize: none;
    max-height: 160px;
    outline: none;
    font-family: inherit;
    height: 36px;
    min-height: 36px;
    box-sizing: border-box;
    line-height: 20px;
    overflow-y: auto;
    transition: height 0.15s ease;
}

.wizm-ai-send-btn {
    background: #109957;
    color: white;
    border: none;
    border-radius: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.wizm-ai-send-btn:hover {
    background: #7c3aed;
}
.wizm-ai-send-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.wizm-ai-footer-text {
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 8px;
}

#wizm-ai-image-preview {
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}
#wizm-ai-image-preview img {
    height: 64px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
#wizm-ai-image-preview .remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    border: none;
}

/* Typing indicator */
.wizm-ai-typing {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}
.wizm-ai-typing span {
    width: 6px;
    height: 6px;
    background: #109957;
    border-radius: 50%;
    animation: wizm-ai-bounce 1.4s infinite ease-in-out both;
}
.wizm-ai-typing span:nth-child(1) { animation-delay: -0.32s; }
.wizm-ai-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes wizm-ai-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* This is the inline chips container (quick-suggest chips) */
.wizm-ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
    max-width: 85%;
    margin-left: 48px;
}
.wizm-ai-suggestion-chip {
    background: #ffffff;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.wizm-ai-suggestion-chip:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}

/* Card Components in Chat Bubble */
.wizm-ai-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    margin: 12px 0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: inherit;
    text-align: left;
}
.wizm-ai-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.wizm-ai-card-title {
    font-weight: 800;
    font-size: 15px;
    color: #111827;
    margin: 0;
}
.wizm-ai-card-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 9999px;
    background: #f3f4f6;
    color: #4b5563;
    white-space: nowrap;
}
.wizm-ai-card-desc {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.4;
    margin: 4px 0 8px 0;
}
.wizm-ai-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}
.wizm-ai-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.wizm-ai-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #109957;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
    margin-top: 4px;
    text-align: center;
}
.wizm-ai-card-btn:hover {
    background: #0e834a;
}

/* Color variations */
.wizm-ai-card.course .wizm-ai-card-badge { background: rgba(16, 153, 87, 0.1); color: #109957; }
.wizm-ai-card.directory .wizm-ai-card-badge { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.wizm-ai-card.book .wizm-ai-card-badge { background: rgba(249, 115, 22, 0.1); color: #f97316; }
.wizm-ai-card.vacancy .wizm-ai-card-badge { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.wizm-ai-card.paper .wizm-ai-card-badge { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.wizm-ai-card.syllabus .wizm-ai-card-badge { background: rgba(14, 165, 233, 0.1); color: #0ea5e9; }
.wizm-ai-card.lesson .wizm-ai-card-badge { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.wizm-ai-card.product .wizm-ai-card-badge { background: rgba(236, 72, 153, 0.1); color: #ec4899; }
.wizm-ai-card.notice .wizm-ai-card-badge { background: rgba(99, 102, 241, 0.1); color: #6366f1; }
.wizm-ai-card.lab .wizm-ai-card-badge { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }
.wizm-ai-card.coder .wizm-ai-card-badge { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.wizm-ai-card.tool .wizm-ai-card-badge { background: rgba(20, 184, 166, 0.1); color: #14b8a6; }
.wizm-ai-card.typer .wizm-ai-card-badge { background: rgba(132, 204, 22, 0.1); color: #84cc16; }
.wizm-ai-card.admission .wizm-ai-card-badge { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.wizm-ai-card.quiz .wizm-ai-card-badge { background: rgba(168, 85, 247, 0.1); color: #a855f7; }

/* Quote Component */
.wizm-ai-card.quote {
    border-left: 4px solid #8b5cf6;
    background: #fdfdfd;
    padding: 16px 20px;
}
.wizm-ai-blockquote {
    margin: 0;
    padding: 0;
}
.wizm-ai-quote-text {
    font-style: italic;
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
    line-height: 1.5;
}
.wizm-ai-quote-author {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Search Trigger in Header */
.wizm-ai-search-trigger {
    cursor: pointer;
    padding: 10px 15px;
    background: #f1f5f9;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    border: 1px solid rgba(0,0,0,0.1);
    max-width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.wizm-ai-search-trigger:hover {
    background: #e2e8f0;
}
.wizm-ai-search-trigger .wizm-ai-search-text {
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
}
@media (max-width: 640px) {
    .wizm-ai-search-trigger {
        padding: 8px 12px;
        gap: 6px;
    }
    .wizm-ai-search-trigger .wizm-ai-search-text {
        font-size: 12px;
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
@media (max-width: 480px) {
    .wizm-ai-search-trigger {
        padding: 8px;
        border-radius: 50%;
        width: 38px;
        height: 38px;
        justify-content: center;
    }
    .wizm-ai-search-trigger .wizm-ai-search-text {
        display: none !important;
    }
}

/* Floating Wiz AI Pill - Glowing Neon Border Flow */
#wizm-ai-pill {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99998;
    height: 56px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: system-ui, -apple-system, sans-serif;
    user-select: none;

    border: 2px solid transparent;
    background-image: linear-gradient(135deg, #0f172a, #1e293b), linear-gradient(90deg, #109957, #10b981, #8b5cf6, #ec4899, #109957);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 100% 100%, 300% 300%;

    box-shadow: 0 10px 25px -5px rgba(16, 153, 87, 0.4), 0 0 15px rgba(16, 153, 87, 0.3);
    animation: wizm-pill-float 3s ease-in-out infinite, wizm-border-flow 4s linear infinite;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#wizm-ai-pill:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 20px 30px -10px rgba(16, 153, 87, 0.6), 0 0 25px rgba(16, 153, 87, 0.5);
}

#wizm-ai-pill:active {
    transform: translateY(0) scale(0.95);
}

.wizm-ai-pill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    width: 24px;
    height: 24px;
}

.wizm-ai-pill-icon img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.wizm-ai-pill-icon i {
    color: #ffffff;
}

@keyframes wizm-pill-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}


/* Floating Tooltip */
#wizm-ai-summarize-tooltip {
    position: fixed;
    bottom: 30px;
    right: 180px;
    z-index: 99998;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: wizm-ai-tooltip-entrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards, wizm-ai-tooltip-nudge 4s ease-in-out infinite;
    transform-origin: right center;
    opacity: 0;
    visibility: hidden;
    font-family: system-ui, -apple-system, sans-serif;
}

#wizm-ai-summarize-tooltip.wizm-ai-tooltip-visible {
    opacity: 1;
    visibility: visible;
}

#wizm-ai-summarize-tooltip:hover {
    background: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -5px rgba(0, 0, 0, 0.4);
    border-color: #109957;
}

/* Tooltip Arrow */
#wizm-ai-summarize-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

#wizm-ai-summarize-tooltip:hover::after {
    background: #0f172a;
    border-right-color: #109957;
    border-top-color: #109957;
}

/* Animations */
@keyframes wizm-ai-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes wizm-ai-pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(16, 153, 87, 0.6), 0 10px 25px -5px rgba(16, 153, 87, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(16, 153, 87, 0), 0 10px 25px -5px rgba(16, 153, 87, 0.4); }
    100% { box-shadow: 0 0 0 0 rgba(16, 153, 87, 0), 0 10px 25px -5px rgba(16, 153, 87, 0.4); }
}

@keyframes wizm-ai-tooltip-entrance {
    from {
        opacity: 0;
        transform: scale(0.9) translateX(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

@keyframes wizm-ai-tooltip-nudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-6px); }
}

/* Hide on small screens or adjust position */
@media (max-width: 768px) {
    #wizm-ai-pill {
        bottom: 16px;
        right: 16px;
        height: 48px;
        padding: 0 16px;
        font-size: 12px;
    }
    #wizm-ai-summarize-tooltip {
        bottom: 20px;
        right: 130px;
        padding: 8px 12px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    #wizm-ai-summarize-tooltip {
        display: none !important;
    }
}

/* Icebreaker Slider styles */
.wizm-ai-icebreaker-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    margin: 16px 20px 8px 20px;
    text-align: left;
}
.wizm-ai-slider-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding: 4px 16px 16px 16px;
    box-sizing: border-box;
    scrollbar-width: none; /* Firefox */
    -webkit-overflow-scrolling: touch;
}
.wizm-ai-slider-wrapper::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}
.wizm-ai-slider {
    display: none;
    gap: 16px;
    width: max-content;
    animation: wizm-ai-slide-fade-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.wizm-ai-slider.active {
    display: flex;
}
.wizm-ai-icebreaker-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    width: 210px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.wizm-ai-icebreaker-card:hover {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.08);
}
.wizm-ai-card-btn.mini {
    font-size: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    margin-top: auto;
}

/* Category context tab styling */
.wizm-ai-contexts-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding: 4px 16px 12px 16px;
    box-sizing: border-box;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.wizm-ai-contexts-wrapper::-webkit-scrollbar {
    display: none;
}
.wizm-ai-contexts-slider {
    display: flex;
    gap: 10px;
    width: max-content;
}
.wizm-ai-context-tab {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}
.wizm-ai-context-tab:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}
.wizm-ai-context-tab.active {
    background: #109957;
    color: #ffffff;
    border-color: #109957;
    box-shadow: 0 4px 12px -2px rgba(16, 153, 87, 0.3);
}

/* Left accent colors for icebreakers */
.wizm-ai-icebreaker-card.lab { border-left: 4px solid #06b6d4; }
.wizm-ai-icebreaker-card.course { border-left: 4px solid #109957; }
.wizm-ai-icebreaker-card.paper { border-left: 4px solid #a855f7; }
.wizm-ai-icebreaker-card.product { border-left: 4px solid #ec4899; }
.wizm-ai-icebreaker-card.relax { border-left: 4px solid #14b8a6; }
.wizm-ai-icebreaker-card.wellness { border-left: 4px solid #f97316; }
.wizm-ai-icebreaker-card.vacancy { border-left: 4px solid #ef4444; }
.wizm-ai-icebreaker-card.ipo { border-left: 4px solid #f59e0b; }
.wizm-ai-icebreaker-card.agm { border-left: 4px solid #3b82f6; }
.wizm-ai-icebreaker-card.coder { border-left: 4px solid #3b82f6; }
.wizm-ai-icebreaker-card.typer { border-left: 4px solid #84cc16; }
.wizm-ai-icebreaker-card.tool { border-left: 4px solid #6366f1; }
.wizm-ai-icebreaker-card.social { border-left: 4px solid #10b981; }

@keyframes wizm-ai-slide-fade-in {
    from {
        opacity: 0;
        transform: translateX(15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animated search bar icon */
.wizm-ai-searchbar-icon.animated {
    animation: wizm-ai-icon-sparkle 3s infinite ease-in-out;
    display: inline-block;
}

@keyframes wizm-ai-icon-sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 2px rgba(16, 153, 87, 0.4));
    }
    50% {
        transform: scale(1.2) rotate(15deg);
        filter: drop-shadow(0 0 8px rgba(16, 153, 87, 0.8));
    }
}

/* Motivating search bar tooltip */
.wizm-ai-search-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 999;
    animation: wizm-ai-tooltip-entrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.wizm-ai-search-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.wizm-ai-search-tooltip-close {
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    color: #9ca3af;
    transition: color 0.2s;
    padding: 0 2px;
    line-height: 1;
}

.wizm-ai-search-tooltip-close:hover {
    color: #ef4444;
}

/* Running border lights for Desktop Searchbar Wrapper */
.wizm-search-wrapper {
    position: relative;
    border-radius: 20px;
    padding: 2px;
    background: #e2e8f0;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(16, 153, 87, 0.12);
}

/* The running light element */
.wizm-search-wrapper::before {
    content: '';
    position: absolute;
    top: -60%;
    left: -60%;
    width: 220%;
    height: 220%;
    background: conic-gradient(
        transparent 65%,
        #109957 80%,
        #10b981 90%,
        #8b5cf6 95%,
        #ec4899 98%,
        transparent 100%
    );
    animation: wizm-running-light 4s linear infinite;
    z-index: -2;
}

/* Mask container to sit over the rotating light */
.wizm-search-wrapper::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: #ffffff;
    border-radius: 18px;
    z-index: -1;
}

/* Restyle the input element inside the wrapper to glow and fit */
.wizm-search-wrapper .wizm-ajax-search {
    border: none !important;
    background: transparent !important;
    border-radius: 18px !important;
    height: 100% !important;
    position: relative;
    z-index: 2;
}

/* Pulsing and glowing searchbar button */
.wizm-search-wrapper form button {
    background: linear-gradient(135deg, #109957 0%, #10b981 100%) !important;
    animation: wizm-button-glow 2s infinite ease-in-out !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    z-index: 3;
}

@keyframes wizm-running-light {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes wizm-button-glow {
    0%, 100% {
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 0 4px rgba(16, 153, 87, 0.4);
        transform: translateY(-50%) scale(1);
    }
    50% {
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 0 12px rgba(16, 153, 87, 0.8);
        transform: translateY(-50%) scale(1.05);
    }
}

/* Fallback hiding rules for retired FAB pill & tooltips */
#wizm-ai-pill, #wizm-ai-summarize-tooltip {
    display: none !important;
}

/* Header dropdown container - glassmorphism design */
.wizm-ai-header-dropdown {
    position: absolute;
    top: 100%;
    right: 8px;
    margin-top: 10px;
    width: 240px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(16, 153, 87, 0.15);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15), 0 0 20px rgba(16, 153, 87, 0.05);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transform-origin: top right;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizm-ai-header-dropdown.wizm-ai-dropdown-hidden {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    pointer-events: none;
}

/* Header section inside dropdown */
.wizm-ai-dropdown-header {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: #64748b;
    padding: 6px 12px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 4px;
    text-align: left;
}

/* Dropdown menu items with modern hover transition */
.wizm-ai-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizm-ai-dropdown-item:hover {
    background: linear-gradient(135deg, rgba(16, 153, 87, 0.08) 0%, rgba(16, 153, 87, 0.02) 100%);
    transform: translateX(2px);
}

/* Icon styling inside dropdown item */
.wizm-ai-dropdown-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(16, 153, 87, 0.08);
    color: #109957;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.wizm-ai-dropdown-item:hover .wizm-ai-dropdown-icon {
    background: #109957;
    color: #ffffff;
    transform: scale(1.05);
}

/* Text layout inside dropdown item */
.wizm-ai-dropdown-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.wizm-ai-dropdown-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.wizm-ai-dropdown-subtitle {
    font-size: 10px;
    font-weight: 500;
    color: #64748b;
    margin-top: 1px;
    line-height: 1.2;
}

/* Conversation Mode Trigger Button in Input Section */
.wizm-ai-voice-trigger {
    background: transparent;
    border: none;
    margin: 0;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.wizm-ai-voice-trigger:hover {
    background: #e5e7eb;
    color: #374151;
}

.wizm-ai-voice-trigger.active {
    background: #109957;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(16, 153, 87, 0.4);
    animation: wizm-voice-active-pulse 2s infinite;
}

@keyframes wizm-voice-active-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Voice Call Screen Overlay */
#wizm-ai-voice-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 24px;
    color: #ffffff;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

#wizm-ai-voice-overlay.wizm-ai-voice-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

/* Header inside voice overlay */
.wizm-ai-voice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.wizm-ai-voice-status-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizm-ai-voice-status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: wizm-status-blink 1.5s infinite;
}

.wizm-ai-voice-status-text {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
}

.wizm-ai-voice-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.wizm-ai-voice-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

@keyframes wizm-status-blink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Speakers visual section */
.wizm-ai-voice-speakers {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1.5;
    margin: 20px 0;
}

.wizm-ai-voice-speaker {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    text-align: center;
}

.wizm-ai-voice-avatar-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizm-ai-voice-avatar {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #ffffff;
    z-index: 2;
    overflow: hidden;
}

.wizm-ai-voice-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wizm-ai-voice-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid #109957;
    opacity: 0;
    z-index: 1;
    transition: all 0.3s ease;
}

/* Speaker active styling */
.wizm-ai-voice-speaker.talking .wizm-ai-voice-pulse {
    animation: wizm-voice-pulse-ring 1.8s cubic-bezier(0.25, 0, 0, 1) infinite;
    opacity: 1;
}

.wizm-ai-voice-speaker.thinking .wizm-ai-voice-pulse {
    border-color: #8b5cf6;
    animation: wizm-voice-pulse-ring 1.2s ease-in-out infinite;
    opacity: 1;
}

#wizm-voice-user-speaker.talking .wizm-ai-voice-pulse {
    border-color: #3b82f6;
}

@keyframes wizm-voice-pulse-ring {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 0.4; }
    100% { transform: scale(1.3); opacity: 0; }
}

.wizm-ai-voice-name {
    font-size: 15px;
    font-weight: 700;
    color: #f8fafc;
}

.wizm-ai-voice-subtext {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-top: 2px;
}

.wizm-ai-voice-speaker.talking .wizm-ai-voice-subtext {
    color: #10b981;
}
#wizm-voice-user-speaker.talking .wizm-ai-voice-subtext {
    color: #3b82f6;
}
.wizm-ai-voice-speaker.thinking .wizm-ai-voice-subtext {
    color: #8b5cf6;
}

/* Central visualizer bridge */
.wizm-ai-voice-bridge {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wizm-voice-wave {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 40px;
}

.wizm-voice-wave span {
    display: block;
    width: 3px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Central wave active states */
.wizm-voice-wave.ai-talking span {
    background-color: #10b981;
    animation: wizm-wave-bounce-active 0.8s ease-in-out infinite;
}

.wizm-voice-wave.user-talking span {
    background-color: #3b82f6;
    animation: wizm-wave-bounce-active 0.8s ease-in-out infinite;
}

.wizm-voice-wave.thinking span {
    background-color: #8b5cf6;
    animation: wizm-wave-bounce-active 0.5s ease-in-out infinite;
}

.wizm-voice-wave span:nth-child(1) { animation-delay: 0.1s !important; }
.wizm-voice-wave span:nth-child(2) { animation-delay: 0.2s !important; }
.wizm-voice-wave span:nth-child(3) { animation-delay: 0.3s !important; }
.wizm-voice-wave span:nth-child(4) { animation-delay: 0.4s !important; }
.wizm-voice-wave span:nth-child(5) { animation-delay: 0.3s !important; }
.wizm-voice-wave span:nth-child(6) { animation-delay: 0.2s !important; }
.wizm-voice-wave span:nth-child(7) { animation-delay: 0.1s !important; }
.wizm-voice-wave span:nth-child(8) { animation-delay: 0.2s !important; }

@keyframes wizm-wave-bounce-active {
    0%, 100% { height: 6px; }
    50% { height: 32px; }
}

/* Transcript Container */
.wizm-ai-voice-transcript-container {
    flex: 1.2;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px;
    overflow-y: auto;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

.wizm-ai-voice-transcript {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.voice-ai-bubble {
    font-size: 13px;
    line-height: 1.5;
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 85%;
    word-break: break-word;
    margin: 0;
}

.voice-ai-bubble.welcome {
    background: transparent;
    color: #94a3b8;
    text-align: center;
    max-width: 100%;
    font-style: italic;
    font-size: 12px;
}

.voice-ai-bubble.user {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border-bottom-right-radius: 2px;
    align-self: flex-end;
    text-align: right;
}

.voice-ai-bubble.ai {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border-bottom-left-radius: 2px;
    align-self: flex-start;
    text-align: left;
}

/* Control buttons footer inside call screen */
.wizm-ai-voice-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 8px;
}

.wizm-voice-control-btn {
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizm-voice-control-btn.mute-mic-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wizm-voice-control-btn.mute-mic-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.wizm-voice-control-btn.mute-mic-btn.muted {
    background: #ef4444;
    border-color: #f87171;
    animation: wizm-mute-shake 0.4s ease;
}

@keyframes wizm-mute-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.wizm-voice-control-btn.end-call-btn {
    background: #ef4444;
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.3);
}

.wizm-voice-control-btn.end-call-btn:hover {
    background: #dc2626;
    transform: scale(1.08) rotate(-135deg);
    box-shadow: 0 12px 20px rgba(239, 68, 68, 0.4);
}

/* Phone symbol correction */
.wizm-voice-control-btn.end-call-btn span {
    transform: rotate(135deg);
    transition: transform 0.25s;
}

.wizm-voice-control-btn.end-call-btn:hover span {
    transform: rotate(0deg);
}


