/* Ora Core: the site's chat launcher (AI first, live team one tap away).
   The orb markup is in every page's HTML so it is painted with the page
   (no pop-in on navigation). ora.js builds the panel on demand. */

@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .28s; }
::view-transition-group(ora-orb) { animation: none; }
::view-transition-old(ora-orb) { display: none; }
::view-transition-new(ora-orb) { animation: none; }
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
}

.ora {
    --ora-gold: #f5c45e;
    --ora-gold-2: #e9a73a;
    --ora-navy: #0b1328;
    --ora-ink: #eef2ff;
    --ora-mute: #9fb0d6;
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9998;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ora-ink);
    -webkit-font-smoothing: antialiased;
}
.ora *, .ora *::before, .ora *::after { box-sizing: border-box; }

/* ---------- Orb ---------- */
.ora-orb {
    position: relative;
    display: block;
    width: 68px;
    height: 68px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    view-transition-name: ora-orb;
    -webkit-tap-highlight-color: transparent;
    transition: transform .35s cubic-bezier(.2, .9, .3, 1.3);
}
.ora-orb:hover { transform: scale(1.06); }
.ora-orb:active { transform: scale(.96); }
.ora-orb:focus-visible { outline: 2px solid var(--ora-gold); outline-offset: 8px; }

.ora-halo {
    position: absolute;
    inset: -16px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 196, 94, .42), rgba(245, 196, 94, 0) 66%);
    animation: oraBreathe 4.2s ease-in-out infinite;
    pointer-events: none;
}
.ora-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(245, 196, 94, 0) 0 38%, var(--ora-gold) 62%, #fff4d2 67%, rgba(245, 196, 94, 0) 80%);
    -webkit-mask: radial-gradient(circle, transparent 0 calc(50% - 3px), #000 calc(50% - 2px));
            mask: radial-gradient(circle, transparent 0 calc(50% - 3px), #000 calc(50% - 2px));
    animation: oraSpin 6s linear infinite;
    pointer-events: none;
}
.ora-core {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 28%, #24345f, var(--ora-navy) 70%);
    border: 1px solid rgba(245, 196, 94, .55);
    box-shadow: 0 14px 36px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
    overflow: hidden;
}
.ora-core::after { /* light sweep across the glass */
    content: "";
    position: absolute;
    inset: -40%;
    background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .16) 50%, transparent 58%);
    transform: translateX(-60%);
    animation: oraSweep 7s ease-in-out infinite;
}
.ora-cube, .ora-x {
    position: absolute;
    transition: opacity .25s ease, transform .35s cubic-bezier(.2, .9, .3, 1.2);
}
.ora-cube { width: 38px; height: 38px; animation: oraFloat 4.2s ease-in-out infinite; }
.ora-x { width: 22px; height: 22px; opacity: 0; transform: rotate(-90deg) scale(.6); color: var(--ora-gold); }
.ora.is-open .ora-cube { opacity: 0; transform: rotate(90deg) scale(.5); }
.ora.is-open .ora-x { opacity: 1; transform: none; }

.ora-pip {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #4ade80;
    border: 3px solid var(--ora-navy);
    box-shadow: 0 0 10px rgba(74, 222, 128, .9);
    opacity: 0;
    transform: scale(.4);
    transition: opacity .3s ease, transform .3s ease;
}
.ora.is-team-online .ora-pip { opacity: 1; transform: none; }

/* ---------- Hint bubble ---------- */
.ora-hint {
    position: absolute;
    right: 84px;
    bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    padding: 10px 12px 10px 15px;
    border-radius: 16px 16px 4px 16px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ora-ink);
    background: linear-gradient(160deg, rgba(22, 32, 62, .92), rgba(8, 13, 30, .95));
    border: 1px solid rgba(245, 196, 94, .3);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
    cursor: pointer;
    opacity: 0;
    transform: translateX(10px) scale(.96);
    pointer-events: none;
    transition: opacity .35s ease, transform .35s ease;
}
.ora-hint.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.ora-hint b { color: var(--ora-gold); font-weight: 600; }
.ora-hint-close {
    border: 0;
    background: rgba(255, 255, 255, .08);
    color: var(--ora-mute);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}
.ora.is-open .ora-hint { display: none; }

/* ---------- Panel ---------- */
.ora-panel {
    position: absolute;
    right: 0;
    bottom: 88px;
    width: 400px;
    height: min(620px, calc(100vh - 140px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 26px;
    background: linear-gradient(160deg, rgba(20, 30, 58, .88), rgba(8, 13, 30, .94));
    -webkit-backdrop-filter: blur(22px) saturate(140%);
            backdrop-filter: blur(22px) saturate(140%);
    border: 1px solid rgba(245, 196, 94, .24);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
    transform-origin: calc(100% - 34px) calc(100% + 54px);
    opacity: 0;
    transform: scale(.4) translateY(30px);
    visibility: hidden;
    transition: opacity .3s ease, transform .45s cubic-bezier(.2, .9, .25, 1.1), visibility 0s linear .45s;
}
.ora.is-open .ora-panel {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition: opacity .25s ease, transform .5s cubic-bezier(.2, .9, .25, 1.1), visibility 0s;
}
.ora-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(520px 230px at 85% -12%, rgba(245, 196, 94, .22), transparent 60%),
        linear-gradient(rgba(245, 196, 94, .045) 1px, transparent 1px) 0 0 / 26px 26px,
        linear-gradient(90deg, rgba(245, 196, 94, .045) 1px, transparent 1px) 0 0 / 26px 26px;
    -webkit-mask: linear-gradient(#000, transparent 45%);
            mask: linear-gradient(#000, transparent 45%);
    pointer-events: none;
}

.ora-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.ora-head-mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    flex-shrink: 0;
    box-shadow: 0 0 24px rgba(245, 196, 94, .45);
}
.ora-head-text { min-width: 0; }
.ora-head h2 {
    margin: 0;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: #fff;
}
.ora-head h2 span { color: var(--ora-gold); }
.ora-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--ora-mute);
}
.ora-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ora-gold);
    box-shadow: 0 0 8px var(--ora-gold);
}
.ora.is-team-online .ora-status-dot { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.ora-head-btns { margin-left: auto; display: flex; gap: 6px; }
.ora-icon-btn {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    color: #cfd8f0;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.ora-icon-btn:hover { background: rgba(245, 196, 94, .18); color: var(--ora-gold); }
.ora-icon-btn svg { width: 16px; height: 16px; }

.ora-log {
    position: relative;
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 196, 94, .3) transparent;
    overscroll-behavior: contain;
}
.ora-msg { display: flex; flex-direction: column; max-width: 86%; animation: oraIn .35s ease both; }
.ora-msg--user { align-self: flex-end; }
.ora-who {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 10.5px;
    letter-spacing: .04em;
    color: #8ea0c8;
}
.ora-who::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ora-gold);
    box-shadow: 0 0 8px var(--ora-gold);
}
.ora-bubble {
    padding: 11px 14px;
    border-radius: 4px 16px 16px 16px;
    font-size: 13.5px;
    line-height: 1.55;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    overflow-wrap: anywhere;
}
.ora-bubble a { color: var(--ora-gold); }
.ora-msg--user .ora-bubble {
    border-radius: 16px 4px 16px 16px;
    background: linear-gradient(135deg, var(--ora-gold), var(--ora-gold-2));
    border: 0;
    color: var(--ora-navy);
    font-weight: 500;
}
.ora-typing { display: inline-flex; gap: 4px; padding: 3px 0; }
.ora-typing i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ora-gold);
    animation: oraDot 1.2s ease-in-out infinite;
}
.ora-typing i:nth-child(2) { animation-delay: .15s; }
.ora-typing i:nth-child(3) { animation-delay: .3s; }

.ora-chips { display: flex; flex-wrap: wrap; gap: 8px; animation: oraIn .35s ease both; }
.ora-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(245, 196, 94, .35);
    background: rgba(245, 196, 94, .06);
    color: #f9dc9b;
    font: inherit;
    font-size: 12.5px;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.ora-chip:hover { background: rgba(245, 196, 94, .16); border-color: var(--ora-gold); transform: translateY(-1px); color: #fff; }

/* "Talk to a person" card */
.ora-hand {
    position: relative;
    margin: 0 14px 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(245, 196, 94, .42);
    background: linear-gradient(135deg, rgba(245, 196, 94, .14), rgba(245, 196, 94, .03));
}
.ora-hand-dot {
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ora-gold);
    box-shadow: 0 0 0 3px rgba(245, 196, 94, .18), 0 0 12px var(--ora-gold);
}
.ora.is-team-online .ora-hand-dot { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .18), 0 0 12px #4ade80; }
.ora-hand-t { font-size: 13px; font-weight: 600; color: #fff; }
.ora-hand-s { margin-top: 2px; font-size: 11.5px; color: #b6c3e3; }
.ora-hand-btn {
    margin-left: auto;
    flex-shrink: 0;
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    color: var(--ora-navy);
    background: linear-gradient(135deg, #ffe7ae, var(--ora-gold));
    box-shadow: 0 6px 18px rgba(245, 196, 94, .35);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.ora-hand-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(245, 196, 94, .5); }
.ora-hand-btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* Input */
.ora-form {
    position: relative;
    margin: 0 14px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 5px 5px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.ora-form:focus-within { border-color: rgba(245, 196, 94, .55); box-shadow: 0 0 0 4px rgba(245, 196, 94, .1); }
.ora-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: none;
    color: #fff;
    font: inherit;
    font-size: 14px;
    padding: 8px 0;
}
.ora-input::placeholder { color: #7f8fb5; }
.ora-mic, .ora-send {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.ora-mic { background: rgba(255, 255, 255, .07); color: #cfd8f0; }
.ora-mic[hidden] { display: none; }
.ora-mic.is-listening { background: rgba(245, 196, 94, .2); color: var(--ora-gold); animation: oraPulse 1.2s ease-in-out infinite; }
.ora-send { background: var(--ora-gold); color: var(--ora-navy); transition: transform .2s ease; }
.ora-send:hover { transform: scale(1.06); }
.ora-send:disabled { opacity: .5; cursor: default; transform: none; }
.ora-mic svg, .ora-send svg { width: 17px; height: 17px; }
.ora-fine {
    margin: -6px 0 10px;
    text-align: center;
    font-size: 10.5px;
    color: #6f7fa6;
}
.ora-fine a { color: inherit; }

.ora-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Live chat (Tawk) is opened only from Ora. Its bubble stays hidden. */
body:not(.ora-live) #tawkchat-container,
body:not(.ora-live) iframe[title="chat widget"],
body:not(.ora-live) [class*="tawk-widget"],
body:not(.ora-live) [id*="tawk"]:not(.ora):not(.ora *) {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
body.ora-live .ora { display: none; }

/* Lead card inside the chat */
.ora-lead { max-width: 100%; align-self: stretch; }
.ora-lead .ora-bubble { display: flex; flex-direction: column; gap: 10px; border-color: rgba(245, 196, 94, .35); }
.ora-lead label { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--ora-mute); }
.ora-lead input, .ora-lead textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(5, 9, 22, .55);
    color: #fff;
    font: inherit;
    font-size: 13.5px;
    padding: 9px 11px;
    resize: vertical;
    outline: 0;
}
.ora-lead input:focus, .ora-lead textarea:focus { border-color: rgba(245, 196, 94, .6); }
.ora-lead .ora-hand-btn { margin: 2px 0 0; align-self: flex-start; }
.ora-lead-err { margin: 0; font-size: 12px; color: #ffb4a8; }
.ora-lead-err:empty { display: none; }
.ora-lead-note { margin: 0; font-size: 11px; color: #7f8fb5; }

/* ---------- Motion ---------- */
@keyframes oraSpin { to { transform: rotate(360deg); } }
@keyframes oraBreathe { 0%, 100% { opacity: .65; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes oraFloat { 0%, 100% { transform: translateY(1px); } 50% { transform: translateY(-2px); } }
@keyframes oraSweep { 0%, 70% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
@keyframes oraIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes oraDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes oraPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 196, 94, .45); } 50% { box-shadow: 0 0 0 8px rgba(245, 196, 94, 0); } }

@media (prefers-reduced-motion: reduce) {
    .ora-halo, .ora-ring, .ora-core::after, .ora-cube { animation: none; }
    .ora-panel, .ora.is-open .ora-panel { transition: opacity .2s ease, visibility 0s; transform: none; }
}

/* ---------- Phones ---------- */
@media (max-width: 600px) {
    .ora { right: 16px; bottom: 16px; }
    .ora-orb { width: 60px; height: 60px; }
    .ora-cube { width: 34px; height: 34px; }
    .ora-hint { right: 74px; bottom: 10px; font-size: 13px; }
    .ora-panel {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 88px;
        width: auto;
        height: calc(100dvh - 110px);
        transform-origin: calc(100% - 40px) calc(100% + 50px);
    }
    .ora-input, .ora-lead input, .ora-lead textarea { font-size: 16px; } /* stops iOS zooming on focus */
}

/* Visible typing cursor in the chat. */
.ora-input, .ora-lead input, .ora-lead textarea { caret-color: #f5c45e; }
