/**
 * Novay AI — Holographic Circular Voice Button System for The Clinics (ذا كلينكس)
 * Ergonomically positioned at shoulder-level for 86" Holobox Touch Kiosks
 * 
 * - Single compact circular launcher
 * - Luminous holographic navy & medical cyan glow
 * - Instant touch/click toggle & acoustic soundwave visual feedback
 * - The Clinics Brand Identity Palette
 */

.holo-voice-controller {
    position: absolute;
    top: 28.5%;
    /* Viewer's LEFT side (Nouf's right shoulder) */
    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: 66px;
    height: 66px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(10, 37, 64, 0.95) 0%, rgba(5, 13, 26, 0.98) 100%);
    border: 2px solid rgba(0, 198, 255, 0.6);
    color: #ffffff;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.5),
        0 0 24px rgba(0, 75, 135, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    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(0, 220, 255, 0.9);
    box-shadow: 
        0 14px 40px rgba(0, 0, 0, 0.55),
        0 0 32px rgba(0, 198, 255, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.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(0, 198, 255, 0.4);
    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.4;
        box-shadow: 0 0 10px rgba(0, 198, 255, 0.2);
    }
    50% {
        transform: scale(1.15);
        opacity: 0.85;
        box-shadow: 0 0 22px rgba(0, 198, 255, 0.55);
    }
}

/* 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(--holo-emerald);
    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: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--clinics-navy), var(--clinics-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(0, 198, 255, 0.65);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.btn-icon-wrapper svg {
    width: 20px;
    height: 20px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ========================================================
   SUBTLE MICRO HINT PILL
======================================================= */
.circle-btn-hint {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 14px;
    background: rgba(10, 25, 45, 0.88);
    border: 1px solid rgba(0, 198, 255, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    pointer-events: none;
    transition: all 0.25s ease;
}

.btn-main-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* ========================================================
   END CALL BUTTON (PILL)
======================================================= */
.holo-end-btn {
    display: none;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.92);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-family: var(--font-tajawal);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.45);
    transition: all 0.2s ease;
}

.holo-end-btn:hover {
    background: #ef4444;
    transform: scale(1.05);
}

/* ========================================================
   STATE STYLES
======================================================= */

/* State: CONNECTING */
.holo-voice-controller.state-connecting .btn-icon-wrapper {
    background: linear-gradient(135deg, var(--holo-amber), #D97706);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
}

.holo-voice-controller.state-connecting .circle-btn-aura {
    border-color: rgba(245, 158, 11, 0.6);
    animation-duration: 1.2s;
}

.holo-voice-controller.state-connecting .circle-btn-hint {
    border-color: rgba(245, 158, 11, 0.4);
}

/* State: LISTENING (Green) */
.holo-voice-controller.state-listening .btn-icon-wrapper {
    background: linear-gradient(135deg, #059669, #10B981);
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.7);
}

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

.holo-voice-controller.state-listening .circle-soundwave-rings span {
    border-color: var(--holo-emerald);
}

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

/* State: SPEAKING (The Clinics Cyan & Navy Glow) */
.holo-voice-controller.state-speaking .btn-icon-wrapper {
    background: linear-gradient(135deg, var(--clinics-cyan), var(--clinics-navy));
    box-shadow: 0 0 20px rgba(0, 198, 255, 0.85);
    animation: holo-speaking-pulse 1.4s ease-in-out infinite;
}

@keyframes holo-speaking-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

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

.holo-voice-controller.state-speaking .circle-soundwave-rings span {
    border-color: var(--clinics-cyan);
}

.holo-voice-controller.state-speaking .circle-btn-hint {
    border-color: rgba(0, 198, 255, 0.6);
}

/* Active State Show End Button */
.holo-voice-controller.is-active .holo-end-btn {
    display: inline-flex;
}

/* ========================================================
   BRAND WATERMARK BADGE — كتف نوف اليسار (يمين الشاشة)
======================================================= */
.holo-brand-controller {
    position: absolute;
    top: 28.5%;
    right: 12% !important;
    left: auto !important;
    z-index: 65;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.holo-circle-badge {
    position: relative;
    z-index: 10;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 248, 255, 0.98) 100%);
    border: 2px solid rgba(0, 75, 135, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.35),
        0 0 20px rgba(0, 198, 255, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
}

.brand-circle-logo {
    max-width: 44px;
    max-height: 44px;
    object-fit: contain;
}

.brand-hint {
    background: rgba(10, 25, 45, 0.88);
    border: 1px solid rgba(0, 198, 255, 0.4);
    padding: 5px 14px;
    border-radius: 14px;
}

.brand-main-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.76rem;
}

.brand-row-main {
    font-size: 0.76rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.brand-row-sub {
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    gap: 4px;
}

.brand-tag {
    color: #00C6FF;
    font-weight: 800;
}

/* ========================================================
   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: 96px;
        height: 96px;
        border-width: 3px;
    }
    .circle-btn-aura {
        inset: -10px;
    }
    .btn-icon-wrapper {
        width: 52px;
        height: 52px;
    }
    .btn-icon-wrapper svg {
        width: 28px;
        height: 28px;
    }
    .brand-circle-logo {
        max-width: 60px;
        max-height: 32px;
    }
    .circle-btn-hint {
        padding: 5px 14px;
        border-radius: 18px;
    }
    .circle-btn-hint.brand-hint {
        padding: 8px 18px;
        border-radius: 18px;
    }
    .btn-main-label {
        font-size: 1.05rem;
    }
    .brand-row-main {
        font-size: 1.05rem;
    }
    .brand-row-sub {
        font-size: 0.95rem;
    }
    .holo-end-btn {
        padding: 6px 16px;
        font-size: 0.95rem;
        border-radius: 16px;
    }
}

