/**
 * Novay AI — Holographic Circular Voice Button System
 * شركة الأدلاء لخدمة ضيوف الرحمن والمساهمين — المساعدة الذكية نوف (Adilla Holobox)
 * 
 * - Single compact circular launcher ("دايرة واحدة بس")
 * - Adilla Royal Purple (#220B61) & Luxury Sand Gold (#C9A275 / #E2B774)
 * - Luminous holographic glow & breathing state auras
 * - Instant touch/click toggle & acoustic soundwave visual feedback
 */

.holo-voice-controller {
    position: absolute;
    top: 28.5%;
    /* Viewer's LEFT side (Nouf's right shoulder) — LOCKED PERMANENT */
    left: 12% !important;
    right: auto !important;
    z-index: 65;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================================
   THE COMPACT CIRCULAR VOICE BUTTON
======================================================== */
.holo-circle-btn {
    position: relative;
    z-index: 10;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 11, 97, 0.95) 0%, rgba(22, 8, 64, 0.98) 100%);
    border: 2px solid rgba(201, 162, 117, 0.75);
    color: #ffffff;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 12px 32px rgba(22, 8, 64, 0.6),
        0 0 24px rgba(201, 162, 117, 0.4),
        inset 0 1px 0 rgba(226, 183, 116, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(0) scale(1);
}

.holo-circle-btn:hover {
    transform: scale(1.08);
    border-color: rgba(226, 183, 116, 0.95);
    box-shadow: 
        0 14px 40px rgba(22, 8, 64, 0.65),
        0 0 32px rgba(201, 162, 117, 0.75),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.holo-circle-btn:active {
    transform: scale(0.95);
}

/* Breathing Outer Glow Aura */
.circle-btn-aura {
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    border: 1.5px solid rgba(201, 162, 117, 0.5);
    animation: holo-aura-breathe 2.8s ease-in-out infinite;
    pointer-events: none;
    transition: all 0.3s ease;
}

@keyframes holo-aura-breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 0.45;
        box-shadow: 0 0 12px rgba(201, 162, 117, 0.3);
    }
    50% {
        transform: scale(1.15);
        opacity: 0.9;
        box-shadow: 0 0 24px rgba(226, 183, 116, 0.6);
    }
}

/* Concentric Acoustic Soundwave Rings */
.circle-soundwave-rings {
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    pointer-events: none;
    display: none;
}

.circle-soundwave-rings span {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid var(--color-adilla-gold-light, #E2B774);
    opacity: 0;
    animation: wave-ring-expand 1.8s cubic-bezier(0.1, 0.4, 0.7, 1) infinite;
}

.circle-soundwave-rings span:nth-child(2) {
    animation-delay: 0.6s;
}

.circle-soundwave-rings span:nth-child(3) {
    animation-delay: 1.2s;
}

@keyframes wave-ring-expand {
    0% {
        transform: scale(0.7);
        opacity: 0.9;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Icon Container */
.btn-icon-wrapper {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E2B774 0%, #C9A275 50%, #B38747 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #160840;
    box-shadow: 0 0 16px rgba(201, 162, 117, 0.65);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.btn-icon-wrapper svg {
    width: 22px;
    height: 22px;
    stroke: #160840;
    stroke-width: 2.4;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ========================================================
   SUBTLE MICRO HINT PILL
======================================================== */
.circle-btn-hint {
    background: rgba(22, 8, 64, 0.88);
    border: 1px solid rgba(201, 162, 117, 0.5);
    border-radius: 14px;
    padding: 4px 12px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    transition: all 0.3s ease;
}

.btn-main-label {
    font-size: 0.82rem;
    font-weight: 700;
    font-family: 'FF Family shamel bold', 'Tajawal', sans-serif;
    color: var(--color-adilla-gold-light, #E2B774);
    letter-spacing: 0.01em;
    white-space: nowrap;
    display: block;
    line-height: 1.2;
    transition: color 0.3s ease;
}

/* ========================================================
   DYNAMIC STATES (IDLE, CONNECTING, LISTENING, SPEAKING)
======================================================== */

/* 1. CONNECTING */
.holo-voice-controller.state-connecting .holo-circle-btn {
    border-color: #E2B774;
    box-shadow: 0 0 35px rgba(201, 162, 117, 0.7);
}

.holo-voice-controller.state-connecting .btn-icon-wrapper {
    background: rgba(201, 162, 117, 0.25);
    animation: spin-pulse 1.2s linear infinite;
}

@keyframes spin-pulse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 2. LISTENING (USER SPEAKING) */
.holo-voice-controller.state-listening .holo-circle-btn {
    background: linear-gradient(135deg, rgba(6, 45, 30, 0.95) 0%, rgba(2, 25, 18, 0.98) 100%);
    border-color: #10B981;
    box-shadow: 
        0 14px 40px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(16, 185, 129, 0.65),
        inset 0 1px 0 rgba(16, 185, 129, 0.5);
}

.holo-voice-controller.state-listening .btn-icon-wrapper {
    background: #10B981;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
}
.holo-voice-controller.state-listening .btn-icon-wrapper svg {
    stroke: #ffffff;
}

.holo-voice-controller.state-listening .circle-soundwave-rings {
    display: block;
}
.holo-voice-controller.state-listening .circle-soundwave-rings span {
    border-color: #10B981;
}

.holo-voice-controller.state-listening .circle-btn-hint {
    border-color: rgba(16, 185, 129, 0.5);
}

.holo-voice-controller.state-listening .btn-main-label {
    color: #10B981;
}

/* 3. SPEAKING (NOUF RESPONDING) */
.holo-voice-controller.state-speaking .holo-circle-btn {
    background: linear-gradient(135deg, rgba(34, 11, 97, 0.95) 0%, rgba(22, 8, 64, 0.98) 100%);
    border-color: #E2B774;
    box-shadow: 
        0 14px 40px rgba(0, 0, 0, 0.6),
        0 0 45px rgba(201, 162, 117, 0.8),
        inset 0 1px 0 rgba(226, 183, 116, 0.6);
}

.holo-voice-controller.state-speaking .circle-soundwave-rings {
    display: block;
}

.holo-voice-controller.state-speaking .circle-soundwave-rings span {
    border-color: #E2B774;
}

.holo-voice-controller.state-speaking .circle-btn-hint {
    border-color: rgba(201, 162, 117, 0.6);
}

.holo-voice-controller.state-speaking .btn-main-label {
    color: #E2B774;
}

/* ========================================================
   ACTIVE CALL END PILL
======================================================== */
.holo-end-btn {
    display: none;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(255, 77, 109, 0.18);
    border: 1px solid rgba(255, 77, 109, 0.4);
    color: #FF859B;
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.holo-end-btn:hover {
    background: rgba(255, 77, 109, 0.35);
    border-color: #FF4D6D;
    color: #fff;
    transform: scale(1.05);
}

.holo-voice-controller.is-active .holo-end-btn {
    display: inline-flex;
}

/* ========================================================
   SYMMETRICAL ADILLA & NOVAY AI BRANDING BADGE (VIEWER'S RIGHT)
======================================================== */
.holo-brand-controller {
    position: absolute;
    top: 38.5%;
    right: 12% !important;
    left: auto !important;
    z-index: 65;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.holo-circle-badge {
    position: relative;
    z-index: 10;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 11, 97, 0.95) 0%, rgba(22, 8, 64, 0.98) 100%);
    border: 2px solid rgba(201, 162, 117, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 12px 32px rgba(22, 8, 64, 0.6),
        0 0 24px rgba(201, 162, 117, 0.4),
        inset 0 1px 0 rgba(226, 183, 116, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: default;
    pointer-events: none;
}

.brand-icon-wrapper {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 14px rgba(201, 162, 117, 0.4);
    flex-shrink: 0;
    overflow: hidden;
    padding: 4px;
}

.brand-circle-logo {
    width: 32px;
    height: auto;
    max-height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.7));
}

.circle-btn-hint.brand-hint {
    background: rgba(22, 8, 64, 0.92);
    border: 1px solid rgba(201, 162, 117, 0.5);
    border-radius: 14px;
    padding: 6px 14px;
    direction: rtl !important;
    text-align: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.brand-main-label {
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'FF Family shamel bold', 'Tajawal', sans-serif;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.01em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    line-height: 1.25;
    direction: rtl !important;
    text-align: center;
}

.brand-row-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
    direction: rtl !important;
}

.brand-row-sub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.82);
    white-space: nowrap;
    direction: ltr !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.powered-by-text {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.68rem;
    letter-spacing: 0.01em;
    text-transform: lowercase;
}

.brand-novay-tag {
    color: #9D5CE6;
    font-weight: 800;
    font-size: 0.76rem;
    letter-spacing: 0.02em;
    direction: ltr !important;
    unicode-bidi: isolate;
    text-shadow: 0 0 10px rgba(157, 92, 230, 0.55);
}

.brand-booth-tag {
    color: #FBF8F3;
    font-weight: 800;
    font-size: 0.72rem;
    direction: ltr !important;
    unicode-bidi: isolate;
    letter-spacing: 0.03em;
    background: rgba(201, 162, 117, 0.25);
    padding: 1px 6px;
    border-radius: 6px;
    border: 1px solid rgba(201, 162, 117, 0.5);
}

/* ========================================================
   4K DISPLAY SCALING (86-INCH VIEWPORT)
======================================================= */
@media (min-width: 1400px) and (min-height: 2000px) {
    .holo-voice-controller,
    .holo-brand-controller {
        gap: 12px;
    }
    .holo-circle-btn,
    .holo-circle-badge {
        width: 98px;
        height: 98px;
        border-width: 3px;
    }
    .circle-btn-aura {
        inset: -10px;
    }
    .btn-icon-wrapper,
    .brand-icon-wrapper {
        width: 54px;
        height: 54px;
    }
    .btn-icon-wrapper svg {
        width: 30px;
        height: 30px;
    }
    .brand-circle-logo {
        width: 44px;
        max-height: 28px;
    }
    .circle-btn-hint {
        padding: 6px 16px;
        border-radius: 18px;
    }
    .circle-btn-hint.brand-hint {
        padding: 8px 18px;
        border-radius: 18px;
    }
    .btn-main-label,
    .brand-main-label {
        font-size: 1.05rem;
    }
    .brand-main-label {
        gap: 5px;
    }
    .brand-row-sub {
        font-size: 0.95rem;
        gap: 6px;
    }
    .powered-by-text {
        font-size: 0.90rem;
    }
    .brand-novay-tag {
        font-size: 1.02rem;
    }
    .brand-booth-tag {
        font-size: 0.95rem;
        padding: 2px 8px;
        border-radius: 8px;
    }
    .holo-end-btn {
        padding: 6px 16px;
        font-size: 0.95rem;
        border-radius: 16px;
    }
}
