
/* AP LIVE INTELLIGENCE V1
   Exclusively scoped to the existing Live Talk screen. */

#liveTalkScreen.is-open {
    --ap-live-gold: #c6a66b;
    --ap-live-ivory: #eeebe3;
    --ap-live-muted: #aaa59a;

    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    box-sizing: border-box;
    padding: 18px;

    background: #090908 !important;
    color: var(--ap-live-ivory);
    overflow: hidden;
    isolation: isolate;
}

#liveTalkScreen.is-open .live-talk-panel {
    box-sizing: border-box !important;

    width: min(100%, 620px) !important;
    max-width: 620px !important;
    height: auto !important;
    max-height: 100% !important;
    min-height: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;

    padding: 22px !important;
    margin: 0 !important;

    overflow-y: auto !important;
    overscroll-behavior: contain;

    background:
        radial-gradient(
            ellipse at 50% 28%,
            rgba(173, 137, 73, .065),
            transparent 56%
        ),
        #11110f !important;

    border: 1px solid #39342a !important;
    border-radius: 25px !important;
    box-shadow: 0 24px 90px #0008 !important;
}

#liveTalkScreen .live-talk-topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    flex-shrink: 0;
    padding: 0 0 13px !important;
    border-bottom: 1px solid #ffffff0c;
}

#liveTalkScreen .live-talk-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

#liveTalkScreen .live-talk-brand-mark {
    display: grid !important;
    place-items: center !important;

    width: 38px !important;
    height: 38px !important;

    border-radius: 11px !important;
    background: #c6a66b !important;
    color: #17130d !important;

    font-size: 13px !important;
    font-weight: 750 !important;
    box-shadow: none !important;
}

#liveTalkScreen .live-talk-brand-text strong {
    color: #eeeae1 !important;
    font-size: 15px !important;
    font-weight: 650 !important;
}

#liveTalkScreen .live-talk-brand-text span {
    display: block;
    color: #aaa295 !important;
    font-size: 11px !important;
    letter-spacing: .04em;
}

#liveTalkScreen .live-talk-close {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px;

    color: #c0bbb0 !important;
    background: #ffffff05 !important;
    border: 1px solid #ffffff12 !important;
    border-radius: 12px !important;

    font-size: 22px !important;
    box-shadow: none !important;
}

#liveTalkScreen .live-talk-status {
    align-self: center;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin: 0 !important;
    padding: 7px 13px !important;

    border: 1px solid #c6a66b30 !important;
    border-radius: 999px !important;
    background: #c6a66b08 !important;

    color: #d8bc85 !important;
    font-size: 11px !important;
    font-weight: 550 !important;
    letter-spacing: .04em;
}

#liveTalkScreen .live-talk-presence {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    flex: 0 0 auto !important;
    gap: 9px !important;

    min-height: 0 !important;
    padding: 8px 0 10px !important;
    margin: 0 !important;
}

#liveTalkScreen .live-talk-orb {
    position: relative !important;

    display: grid !important;
    place-items: center !important;

    width: clamp(156px, 28vh, 218px) !important;
    height: clamp(156px, 28vh, 218px) !important;

    margin: 3px auto 7px !important;
    padding: 0 !important;

    border-radius: 50% !important;
    background: radial-gradient(
        circle,
        #c6a66b16,
        transparent 71%
    ) !important;

    box-shadow: none !important;
    overflow: visible !important;
}

#liveTalkScreen .live-talk-orb-inner {
    position: relative !important;
    display: grid !important;
    place-items: center !important;

    width: 56% !important;
    height: 56% !important;

    border-radius: 50% !important;
    border: 1px solid #c6a66b !important;

    background:
        radial-gradient(circle at 34% 25%,
            #d6b57860, transparent 44%),
        radial-gradient(circle at 64% 70%,
            #80643c60, transparent 53%),
        #211b12 !important;

    box-shadow:
        inset 0 0 25px #d7b47716,
        0 0 38px #c6a66b1c !important;

    color: #f1d6a0 !important;
    font-size: 25px !important;
    font-weight: 600 !important;
    letter-spacing: .16em;

    animation: none !important;
    z-index: 2;
}

#liveTalkScreen .live-talk-orb-ring {
    position: absolute !important;
    border-radius: 50% !important;
    border: 1px solid #c6a66b35 !important;
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: none;
    animation: none !important;
}

#liveTalkScreen .live-talk-orb-ring.ring-one {
    inset: 15% !important;
    width: 70% !important;
    height: 70% !important;
    transform: none !important;
}

#liveTalkScreen .live-talk-orb-ring.ring-two {
    inset: 7% !important;
    width: 86% !important;
    height: 86% !important;
    transform: none !important;
    opacity: .65;
}

#liveTalkScreen .live-talk-orb-ring.ring-three {
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
    opacity: .4;
}

#liveTalkScreen .live-talk-orb::before {
    content: "";
    position: absolute;
    inset: 7%;

    border: 1px solid #d6b57866;
    border-radius: 50%;

    transform: rotate(-28deg) scaleY(.47);
    pointer-events: none;
}

#liveTalkScreen .live-talk-orb::after {
    content: "";
    position: absolute;
    inset: 7%;

    border-radius: 50%;
    background: radial-gradient(
        circle at 50% 1%,
        #f1d6a0 0 2px,
        #c6a66b40 3px,
        transparent 7px
    );

    pointer-events: none;
    animation: none;
}

#liveTalkScreen.is-open .live-talk-orb::after {
    animation: apLiveIntelligenceOrbit 18s linear infinite;
}

@keyframes apLiveIntelligenceOrbit {
    to { transform: rotate(360deg); }
}

#liveTalkScreen .live-talk-presence h1 {
    font-size: clamp(22px, 4vw, 29px) !important;
    font-weight: 600 !important;
    letter-spacing: -.035em !important;

    color: #e8dfcd !important;
    margin: 0 !important;
    line-height: 1.25;
}

#liveTalkScreen #liveTalkSubtext {
    max-width: 350px;
    text-align: center;

    color: #aaa59a !important;
    font-size: 12px !important;
    line-height: 1.6;

    margin: 0 !important;
}

#liveTalkScreen .live-talk-transcript {
    box-sizing: border-box;
    flex: 1 1 auto !important;

    min-height: 84px !important;
    max-height: clamp(105px, 21vh, 190px) !important;

    padding: 14px !important;
    margin: 0 !important;
    overflow-y: auto !important;

    background: #ffffff03 !important;
    border: 1px solid #ffffff0e !important;
    border-radius: 14px !important;

    color: #dedad1 !important;
    font-size: 13px !important;
    line-height: 1.65 !important;
    overflow-wrap: anywhere;
}

#liveTalkScreen .live-talk-empty {
    color: #a39d91 !important;
    font-size: 12px !important;
}

#liveTalkScreen .live-talk-voice-section {
    flex-shrink: 0;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border: 0 !important;
}

#liveTalkScreen .live-talk-section-title {
    color: #999184 !important;
    font-size: 10px !important;
    letter-spacing: .14em;
    margin-bottom: 9px !important;
}

#liveTalkScreen .live-talk-voice-options {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px !important;
}

#liveTalkScreen .live-talk-voice-option {
    min-width: 0;
    min-height: 56px !important;
    padding: 10px !important;

    color: #e6dfd2 !important;
    background: #ffffff03 !important;
    border: 1px solid #ffffff12 !important;
    border-radius: 12px !important;

    box-shadow: none !important;
}

#liveTalkScreen .live-talk-voice-option.active {
    background: #c6a66b0a !important;
    border-color: #c6a66b80 !important;
}

#liveTalkScreen .live-talk-voice-symbol {
    color: #d5b77f !important;
    background: #c6a66b10 !important;
}

#liveTalkScreen .live-talk-voice-text strong {
    color: #e6dfd2 !important;
    font-size: 12px !important;
}

#liveTalkScreen .live-talk-voice-text small {
    color: #aaa295 !important;
    font-size: 10px !important;
}

#liveTalkScreen .live-talk-controls {
    display: grid !important;
    grid-template-columns: repeat(3,minmax(0,1fr));
    align-items: stretch !important;

    gap: 8px !important;
    flex-shrink: 0;

    margin: 0 !important;
    padding: 12px 0 0 !important;

    border-top: 1px solid #ffffff0c;
    background: transparent !important;
}

#liveTalkScreen .live-talk-controls button {
    box-sizing: border-box;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 6px !important;
    min-width: 0 !important;
    width: 100% !important;

    min-height: 65px !important;
    height: auto !important;
    padding: 10px 6px !important;

    border: 1px solid #ffffff14 !important;
    border-radius: 13px !important;
    background: #ffffff04 !important;

    color: #d9c7a5 !important;
    font-size: 11px !important;
    box-shadow: none !important;
}

#liveTalkScreen #liveTalkMicBtn.active {
    background: #c6a66b0c !important;
    border-color: #c6a66b55 !important;
}

#liveTalkScreen #liveTalkEndBtn {
    background: #8e3f351b !important;
    color: #efaaa3 !important;
    border-color: #a653484d !important;
}

#liveTalkScreen button:focus-visible {
    outline: 2px solid #d6b578 !important;
    outline-offset: 3px;
}

#liveTalkScreen .live-talk-footer {
    color: #928b7e !important;
    font-size: 10px !important;
    text-align: center;
    margin: 0 !important;
}

@media (max-width: 600px) {
    #liveTalkScreen.is-open {
        padding: 0 !important;
    }

    #liveTalkScreen.is-open .live-talk-panel {
        width: 100% !important;
        max-width: none !important;
        height: 100% !important;
        max-height: 100% !important;

        border: 0 !important;
        border-radius: 0 !important;

        gap: 12px !important;

        padding:
            max(16px,env(safe-area-inset-top))
            17px
            max(12px,env(safe-area-inset-bottom))
            !important;
    }
}

@media (max-height: 720px) {
    #liveTalkScreen .live-talk-orb {
        width: 145px !important;
        height: 145px !important;
    }

    #liveTalkScreen .live-talk-presence {
        padding: 3px 0 !important;
    }

    #liveTalkScreen.is-open .live-talk-panel {
        gap: 9px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #liveTalkScreen .live-talk-orb,
    #liveTalkScreen .live-talk-orb *,
    #liveTalkScreen .live-talk-orb::after {
        animation: none !important;
    }
}

/* AP LIVE INTELLIGENCE V2 — scoped status and transcript */
#liveTalkScreen .live-talk-voice-option:not(.active) .live-talk-voice-check { visibility:hidden!important; }
#liveTalkScreen .live-talk-voice-text {display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:3px;}
#liveTalkScreen .live-talk-message {margin:0 0 10px;padding:9px 10px;border-radius:10px;background:#ffffff05;}
#liveTalkScreen .live-talk-message-label {font-size:10px;color:#c6a66b;font-weight:600;margin-bottom:4px;}
#liveTalkScreen .live-talk-message-body {white-space:pre-wrap;overflow-wrap:anywhere;}
#liveTalkScreen #liveTalkSubtext {max-height:3.3em;overflow:auto;overflow-wrap:anywhere;}
#liveTalkScreen[data-ap-live-state="Muted"] .live-talk-orb::after,
#liveTalkScreen[data-ap-live-state="Paused"] .live-talk-orb::after,
#liveTalkScreen[data-ap-live-state="Microphone unavailable"] .live-talk-orb::after {animation:none!important;opacity:.35;}
#liveTalkScreen[data-ap-live-state="Listening"] .live-talk-orb-inner {box-shadow:0 0 36px #c6a66b38!important;}
#liveTalkScreen[data-ap-live-state="Speaking"] .live-talk-orb-inner {box-shadow:0 0 48px #c6a66b65!important;}

/* AP LIVE TRANSCRIPT VOICES V7 */
#liveTalkScreen.is-open .live-talk-panel {
    height: min(850px,100%) !important;
    min-height: 0 !important;
    gap: 10px !important;
}
#liveTalkScreen .live-talk-topbar,
#liveTalkScreen .live-talk-status,
#liveTalkScreen .live-talk-voice-section,
#liveTalkScreen .live-talk-controls,
#liveTalkScreen .live-talk-footer {flex-shrink:0!important;}
#liveTalkScreen .live-talk-presence {
    gap: 5px !important;
    padding: 0 !important;
}
#liveTalkScreen .live-talk-orb {
    width: clamp(96px,17dvh,154px) !important;
    height: clamp(96px,17dvh,154px) !important;
    margin: 0 auto 3px !important;
}
#liveTalkScreen .live-talk-presence h1 {font-size:20px!important;}
#liveTalkScreen #liveTalkSubtext {font-size:12px!important;}
#liveTalkScreen #liveTalkTranscript {
    flex: 1 0 200px !important;
    min-height: 200px !important;
    max-height: none !important;
    height: auto !important;
    padding: 13px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overflow-anchor: none;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #6b6049 transparent;
    display: block !important;
    contain: none !important;
    text-align: left !important;
}
#liveTalkScreen .live-talk-message {
    display: block !important;
    max-width: 100% !important;
    width: auto !important;
    margin: 0 0 13px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    text-align: left !important;
}
#liveTalkScreen .live-talk-message-label {
    font-size: 11px !important;
    color: #c6a66b !important;
    font-weight: 650 !important;
    margin: 0 0 5px !important;
}
#liveTalkScreen .live-talk-message-body {
    font-size: 14px !important;
    line-height: 1.65 !important;
    color: #eeeae1 !important;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere;
    max-height: none !important;
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    text-overflow: clip !important;
}
#liveTalkScreen .live-talk-section-title {
    display:flex!important;align-items:center;justify-content:space-between;
    gap:8px;margin-bottom:6px!important;
}
#liveTalkScreen .ap-live-voice-picker {
    display:inline-flex;align-items:center;gap:5px;
    font-size:10px;letter-spacing:0;text-transform:none;color:#c6a66b;
}
#liveTalkScreen #apLiveVoicePicker {
    max-width:125px;min-height:32px;padding:4px 5px;
    font:inherit;font-size:11px;color:#eeeae1;
    color-scheme:dark;background:#211e17;
    border:1px solid #6b6049;border-radius:8px;
}
#liveTalkScreen #apLiveVoicePicker:focus-visible {outline:2px solid #d6b578;outline-offset:2px;}
#liveTalkScreen .live-talk-voice-text {display:flex!important;flex-direction:column;align-items:flex-start;gap:3px;min-width:0;}
#liveTalkScreen .live-talk-voice-option {min-height:48px!important;padding:8px!important;}
#liveTalkScreen .live-talk-voice-option:not(.active) .live-talk-voice-check {visibility:hidden!important;}
#liveTalkScreen .live-talk-controls {padding-top:8px!important;}
#liveTalkScreen .live-talk-controls button {min-height:56px!important;}
@media(max-width:600px){
    #liveTalkScreen.is-open .live-talk-panel {height:100%!important;gap:9px!important;}
}
@media(max-height:650px){
    #liveTalkScreen .live-talk-orb {width:90px!important;height:90px!important;}
    #liveTalkScreen #liveTalkTranscript {min-height:160px!important;flex-basis:160px!important;}
}


/* AP LIVE RESILIENCE V9 */

#liveTalkScreen .live-talk-brand-mark {
    background-color: transparent !important;
    color: #d6b578 !important;
    box-shadow: none !important;
    border-radius: 50% !important;
}

#liveTalkScreen #apLiveInterrupt {
    min-height: 28px;
    padding: 4px 10px;
    margin-left: 5px;
    border: 1px solid #c6a66b55;
    border-radius: 7px;
    background: #c6a66b0c;
    color: #e3c48c;
    font-size: 11px;
    cursor: pointer;
}

#liveTalkScreen #apLiveInterrupt[hidden] {
    display: none !important;
}

#liveTalkScreen #apLiveInterrupt:focus-visible {
    outline: 2px solid #d6b578;
    outline-offset: 2px;
}

#liveTalkScreen[data-ap-live-state="Paused"]
.live-talk-orb::after,

#liveTalkScreen[data-ap-live-state="Muted"]
.live-talk-orb::after,

#liveTalkScreen[data-ap-live-state="Microphone unavailable"]
.live-talk-orb::after {
    animation-play-state: paused !important;
}

/* AP MOBILE TOOLBAR POLISH V1 */

@media (max-width: 767px) {
    #liveTalkBtn {
        box-sizing: border-box !important;
        background: transparent !important;
        border-color: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
        white-space: nowrap !important;
        justify-content: flex-start !important;
        color: #c7b58e !important;
    }

    #liveTalkBtn span {
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: clip !important;
        font-size: 10px !important;
    }

    #liveTalkBtn svg {
        flex-shrink: 0 !important;
    }

    :has(> #liveTalkBtn) {
        column-gap: 6px !important;
    }
}

/* AP MOBILE MOTTO POLISH V1 */
@media (max-width: 767px) {
    span[data-ap-mobile-motto="true"] {
        font-size: 10.5px !important;
        position: relative !important;
        top: -2px !important;
    }
}

/* AP LIVE LABEL PERMANENT V1 */

@media (max-width: 767px) {
    :has(> #liveTalkBtn) {
        overflow: visible !important;
    }

    #liveTalkBtn {
        overflow: visible !important;
        contain: none !important;
        clip-path: none !important;
        mask-image: none !important;
        position: relative !important;
        justify-content: flex-start !important;
    }

    #liveTalkBtn .live-talk-icon {
        flex-shrink: 0 !important;
    }

    #liveTalkBtn .live-talk-label {
        position: absolute !important;
        left: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        display: block !important;
        flex: 0 0 auto !important;
        width: max-content !important;
        min-width: max-content !important;
        max-width: none !important;
        max-inline-size: none !important;
        white-space: nowrap !important;
        overflow: visible !important;
        clip-path: none !important;
        contain: none !important;
        text-overflow: clip !important;
        font-size: 10px !important;
    }
}
