/* Leykun voice agent. Brand blues match asset/css/main.min.css. */
.lv-root {
    --lv-brand: #21409a;
    --lv-deep: #112369;
    --lv-light: #80a7ff;
    --lv-white: #eaf1ff;
    --voice-level: 0;
    position: fixed;
    right: max(24px, env(safe-area-inset-right));
    bottom: max(24px, env(safe-area-inset-bottom));
    width: 72px;
    height: 72px;
    z-index: 2147483000;
    color: var(--lv-white);
    isolation: isolate;
    color-scheme: dark;
    -webkit-tap-highlight-color: transparent;
}

.lv-root *, .lv-root *::before, .lv-root *::after { box-sizing: border-box; }
.lv-root button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    padding: 0;
    float: none;
    min-width: 0;
    font: inherit;
    color: inherit;
    text-transform: none;
    cursor: pointer;
    touch-action: manipulation;
}
.lv-root button:focus-visible { outline: 2px solid #bdd2ff; outline-offset: 5px; }
.lv-root button:disabled { cursor: default; opacity: .35; }
.lv-root svg { display: block; width: 22px; height: 22px; pointer-events: none; }

.lv-launch {
    position: relative;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border: 1px solid rgb(128 167 255 / 30%);
    border-radius: 50%;
    background: #070f29;
    box-shadow: 0 8px 28px rgb(0 0 0 / 30%), 0 0 24px rgb(33 64 154 / 30%);
    transition: transform .2s ease, border-color .2s ease;
}
.lv-launch:hover { transform: translateY(-3px); border-color: rgb(128 167 255 / 65%); }
.lv-launch:active { transform: scale(.96); }
.lv-launch-halo {
    position: absolute;
    inset: -7px;
    border: 1px solid rgb(128 167 255 / 26%);
    border-radius: 50%;
    animation: lv-launch-breathe 3.5s ease-in-out infinite;
    pointer-events: none;
}
.lv-launch-orb {
    position: relative;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border: 1px solid rgb(173 199 255 / 45%);
    border-radius: 50%;
    background: radial-gradient(circle at 29% 25%, #a5c3ff 0, #4f7ae0 15%, var(--lv-brand) 39%, var(--lv-deep) 65%, #040b23 89%);
    box-shadow: 0 0 21px rgb(66 109 237 / 48%), inset -3px -4px 10px #081132;
}
.lv-launch-orb span {
    position: absolute;
    inset: -20%;
    border: 3px solid rgb(198 218 255 / 54%);
    border-radius: 39% 61% 57% 43%;
    transform: rotate(-35deg) scaleY(.44);
    box-shadow: 0 0 8px #7c9ff5, inset 0 0 8px #7c9ff5;
    animation: lv-launch-flow 7s linear infinite;
}
.lv-launch-spark {
    position: absolute;
    right: 4px;
    bottom: 5px;
    width: 10px;
    height: 10px;
    border: 2px solid #091330;
    border-radius: 50%;
    background: #a2c0ff;
    box-shadow: 0 0 10px rgb(128 167 255 / 65%);
}
.lv-root[data-open="true"] .lv-launch { visibility: hidden; pointer-events: none; }
.lv-root[data-open="true"] .lv-launch * { animation-play-state: paused; }

.lv-panel[hidden] { display: none !important; }
.lv-panel {
    position: fixed;
    inset: 0;
    display: grid;
    align-items: end;
    justify-items: end;
    padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
    background: rgb(3 3 15 / 68%);
    overscroll-behavior: contain;
    touch-action: none;
}
.lv-surface {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(382px, 100%);
    height: min(474px, calc(100dvh - 48px));
    min-height: 280px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid rgb(128 167 255 / 22%);
    border-radius: 34px;
    background: radial-gradient(ellipse at 50% 40%, #101c45 0, #080e22 52%, #040814 100%);
    box-shadow: 0 28px 90px rgb(0 0 0 / 50%), 0 0 70px rgb(33 64 154 / 15%), inset 0 1px rgb(219 232 255 / 6%);
    contain: layout paint;
    animation: lv-appear .22s ease-out both;
}
.lv-ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 36%, rgb(61 94 206 / 14%), transparent 62%);
}
.lv-topbar { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }
.lv-control {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    border: 1px solid rgb(155 184 255 / 25%);
    border-radius: 50%;
    background: rgb(26 45 95 / 62%);
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease, opacity .18s ease;
}
.lv-control:not(:disabled):hover { background: rgb(47 76 153 / 65%); border-color: rgb(174 200 255 / 55%); }
.lv-control:not(:disabled):active { transform: scale(.94); }
.lv-control-small { width: 44px; height: 44px; border-color: rgb(155 184 255 / 13%); background: rgb(19 30 59 / 52%); }
.lv-control-small svg { width: 19px; height: 19px; }
.lv-session-lights { display: flex; gap: 5px; align-items: center; }
.lv-session-lights i { width: 4px; height: 4px; border-radius: 50%; background: #7c9ace; opacity: .45; }
.lv-session-lights i:nth-child(2) { opacity: .9; box-shadow: 0 0 9px rgb(128 167 255 / 60%); }

.lv-stage {
    position: relative;
    display: grid;
    place-items: center;
    flex: 1 1 auto;
    min-height: 140px;
    pointer-events: none;
}
.lv-orb {
    position: relative;
    width: 174px;
    height: 174px;
    border-radius: 50%;
    transform: scale(calc(1 + var(--voice-level) * .13));
}
.lv-orb-aura {
    position: absolute;
    inset: -32%;
    border-radius: 50%;
    background: radial-gradient(circle, rgb(84 125 242 / 27%) 13%, rgb(33 64 154 / 22%) 40%, transparent 70%);
    opacity: calc(.65 + var(--voice-level) * .35);
    animation: lv-breathe 5s ease-in-out infinite;
}
.lv-orb-body {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border: 1px solid rgb(160 189 255 / 50%);
    border-radius: 50%;
    background: radial-gradient(circle at 29% 24%, #719cf4 0, #315bbc 23%, var(--lv-brand) 42%, var(--lv-deep) 66%, #03091f 92%);
    box-shadow: 0 0 23px rgb(75 111 224 / 30%), 0 0 65px rgb(33 64 154 / 35%), inset 4px 3px 12px rgb(168 198 255 / 25%), inset -12px -17px 28px rgb(1 5 25 / 70%);
}
.lv-orb-flow {
    position: absolute;
    inset: -20%;
    border: 2px solid rgb(179 207 255 / 60%);
    border-radius: 42% 58% 54% 46%;
    box-shadow: 0 0 8px rgb(143 181 255 / 55%), inset 0 0 13px rgb(96 144 255 / 44%);
    animation: lv-flow-one 11s linear infinite;
}
.lv-orb-flow-two { inset: -30%; border-width: 8px; border-color: rgb(73 119 236 / 62%); animation: lv-flow-two 15s linear infinite; }
.lv-orb-flow-three { inset: -17%; border-width: 1px; border-color: rgb(212 229 255 / 73%); animation: lv-flow-three 13s linear infinite; }
.lv-orb-light {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse at 30% 23%, rgb(230 240 255 / 49%) 0, transparent 28%), radial-gradient(ellipse at 72% 83%, rgb(53 104 242 / 48%), transparent 40%);
    box-shadow: inset 0 0 18px rgb(7 15 49 / 38%);
}
.lv-orb-contour { position: absolute; inset: -6px; border: 1px solid rgb(136 173 255 / 18%); border-radius: 50%; }
.lv-orb-contour-two { inset: -14px; border-color: rgb(95 139 236 / 11%); }
.lv-orbit { position: absolute; width: 256px; height: 256px; border: 1px solid rgb(103 145 244 / 13%); border-radius: 50%; }
.lv-orbit-one { transform: rotate(-31deg) scaleY(.65); }
.lv-orbit-two { width: 286px; height: 286px; transform: rotate(35deg) scaleY(.67); border-color: rgb(103 145 244 / 8%); }
.lv-orbit-three { width: 218px; height: 218px; border-color: rgb(103 145 244 / 6%); }
.lv-orbit-one::after {
    content: "";
    position: absolute;
    left: 29px;
    top: 37px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #99b7ff;
    box-shadow: 0 0 9px #6d9fff;
}
.lv-particles { position: absolute; inset: 0; }
.lv-particles i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #91adf1; opacity: .55; }
.lv-particles i:nth-child(1) { left: 16%; top: 23%; }
.lv-particles i:nth-child(2) { left: 73%; top: 17%; }
.lv-particles i:nth-child(3) { right: 8%; top: 52%; }
.lv-particles i:nth-child(4) { left: 21%; bottom: 18%; }
.lv-particles i:nth-child(5) { right: 25%; bottom: 17%; }
.lv-particles i:nth-child(6) { left: 6%; top: 58%; opacity: .3; }
.lv-floor-glow { position: absolute; bottom: 6%; width: 150px; height: 24px; background: radial-gradient(ellipse, rgb(40 79 179 / 23%), transparent 70%); }

.lv-bottom { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 16px; padding-bottom: 3px; }
.lv-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 23px; }
.lv-wave i { display: block; width: 3px; height: 18px; border-radius: 8px; background: #91b3ff; opacity: .7; transform: scaleY(calc(.2 + var(--voice-level) * .8)); }
.lv-wave i:nth-child(2n) { height: 12px; opacity: .5; }
.lv-wave i:nth-child(3n) { height: 23px; }
.lv-wave i:first-child, .lv-wave i:last-child { height: 8px; opacity: .3; }
.lv-root .lv-mic-off { display: none; }
.lv-root[data-muted="true"] .lv-mic-off { display: block; }
.lv-root[data-muted="true"] .lv-mic-on { display: none; }
.lv-root[data-muted="true"] .lv-mute { background: rgb(143 169 225 / 19%); border-color: rgb(200 218 255 / 55%); }

/* State is conveyed through light and movement; all spoken status is accessible. */
.lv-root[data-state="connecting"] .lv-orb { transform: scale(.89); }
.lv-root[data-state="connecting"] .lv-orb-aura { animation-duration: 1.5s; }
.lv-root[data-state="connecting"] .lv-session-lights i { animation: lv-connect .9s ease-in-out infinite; }
.lv-root[data-state="connecting"] .lv-session-lights i:nth-child(2) { animation-delay: .15s; }
.lv-root[data-state="connecting"] .lv-session-lights i:nth-child(3) { animation-delay: .3s; }
.lv-root[data-state="speaking"] .lv-orb-flow-one { animation-duration: 5s; }
.lv-root[data-state="speaking"] .lv-orb-flow-two { animation-duration: 7s; }
.lv-root[data-state="speaking"] .lv-session-lights i { background: #c6d8ff; opacity: 1; box-shadow: 0 0 8px rgb(128 167 255 / 60%); }
.lv-root[data-state="muted"] .lv-orb-body { opacity: .6; }
.lv-root[data-state="muted"] .lv-orb-aura { opacity: .3; }
.lv-root[data-state="muted"] .lv-wave { opacity: .25; }
.lv-root[data-state="error"] .lv-orb { transform: scale(.84); }
.lv-root[data-state="error"] .lv-orb-body { opacity: .38; }
.lv-root[data-state="error"] .lv-orb-aura { opacity: .14; animation: none; }
.lv-root[data-state="error"] .lv-orb-flow { animation-play-state: paused; }
.lv-root[data-state="error"] .lv-wave { opacity: .2; }
.lv-root[data-state="error"] .lv-session-lights i { background: #cfddff; opacity: .3; }
.lv-root[data-state="error"] [data-voice-retry] { border-color: #8aacff; background: var(--lv-brand); box-shadow: 0 0 20px rgb(67 110 225 / 38%); }
.lv-root[data-state="error"] [data-voice-retry] svg { animation: lv-retry-hint 2.5s ease-in-out 3; }
.lv-root .lv-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@keyframes lv-appear { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes lv-launch-breathe { 0%, 100% { transform: scale(.97); opacity: .35; } 50% { transform: scale(1.04); opacity: .8; } }
@keyframes lv-launch-flow { from { transform: rotate(-35deg) scaleY(.44); } to { transform: rotate(325deg) scaleY(.44); } }
@keyframes lv-breathe { 0%, 100% { transform: scale(.94); } 50% { transform: scale(1.06); } }
@keyframes lv-flow-one { from { transform: rotate(-40deg) scaleY(.4); } to { transform: rotate(320deg) scaleY(.4); } }
@keyframes lv-flow-two { from { transform: rotate(47deg) scaleY(.55); } to { transform: rotate(-313deg) scaleY(.55); } }
@keyframes lv-flow-three { from { transform: rotate(135deg) scaleY(.48); } to { transform: rotate(495deg) scaleY(.48); } }
@keyframes lv-connect { 0%, 100% { opacity: .2; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes lv-retry-hint { 0%, 55%, 100% { transform: rotate(0); } 75% { transform: rotate(-35deg); } }

@media (max-width: 560px) {
    .lv-root { right: max(17px, env(safe-area-inset-right)); bottom: max(17px, env(safe-area-inset-bottom)); width: 64px; height: 64px; }
    .lv-launch { width: 64px; height: 64px; }
    .lv-launch-orb { width: 44px; height: 44px; }
    .lv-panel { justify-items: center; padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
    .lv-surface { width: min(382px, 100%); height: min(474px, calc(100dvh - 36px)); border-radius: 30px; padding: 18px; }
}
@media (max-height: 520px) {
    .lv-surface { min-height: 220px; padding: 12px 18px; }
    .lv-orb { width: 116px; height: 116px; }
    .lv-orbit { width: 176px; height: 176px; }
    .lv-orbit-two { width: 202px; height: 202px; }
    .lv-orbit-three { width: 148px; height: 148px; }
    .lv-stage { min-height: 116px; }
    .lv-bottom { gap: 6px; }
    .lv-mute { width: 46px; height: 46px; }
    .lv-wave { height: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .lv-root *, .lv-root *::before, .lv-root *::after { animation: none !important; transition: none !important; }
    .lv-root .lv-orb { transform: none !important; }
    .lv-orb-flow-one { transform: rotate(-40deg) scaleY(.4); }
    .lv-orb-flow-two { transform: rotate(47deg) scaleY(.55); }
    .lv-orb-flow-three { transform: rotate(135deg) scaleY(.48); }
    .lv-wave i { transform: scaleY(.4); }
}
@media (forced-colors: active) {
    .lv-launch, .lv-control, .lv-surface { border: 1px solid ButtonText; }
    .lv-orb-body, .lv-launch-orb { forced-color-adjust: none; }
    .lv-root button:focus-visible { outline-color: Highlight; }
}
