/* Ask Sun Data — the website assistant. Sun Data navy and orange, the site's
   own Manrope; sized for a phone first, a docked window on larger screens. */

#sd-chat {
    --sdc-navy: #152B4E;
    --sdc-blue: #124A9A;
    --sdc-orange: #E86A38;
    --sdc-ink: #1B2A3F;
    --sdc-muted: #66778C;
    --sdc-line: #E1E8F1;
    --sdc-bg: #F4F7FB;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9990;
    font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--sdc-ink);
}

#sd-chat *, #sd-chat *::before, #sd-chat *::after { box-sizing: border-box; }
#sd-chat .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.sdc-launch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding: 12px 18px 12px 14px;
    border: 0;
    border-radius: 999px;
    background: var(--sdc-navy);
    color: #fff;
    font: inherit;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(21, 43, 78, .32);
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
}

.sdc-launch:hover { background: var(--sdc-blue); transform: translateY(-2px); }
.sdc-launch:focus-visible { outline: 3px solid var(--sdc-orange); outline-offset: 3px; }
.sdc-launch__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sdc-orange); }
#sd-chat.is-open .sdc-launch__text { display: none; }
#sd-chat.is-open .sdc-launch { padding: 12px; }

.sdc-tease {
    position: absolute;
    right: 0;
    bottom: 66px;
    width: 260px;
    padding: 14px 34px 14px 16px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(21, 43, 78, .18);
    animation: sdc-in .25s ease;
}

.sdc-tease p { margin: 0; font-size: 14px; cursor: pointer; }
.sdc-tease__x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--sdc-muted); cursor: pointer; }

.sdc-panel {
    position: absolute;
    right: 0;
    bottom: 66px;
    display: flex;
    flex-direction: column;
    width: 390px;
    height: min(640px, calc(100vh - 110px));
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(21, 43, 78, .28);
    overflow: hidden;
    animation: sdc-in .22s ease;
}

.sdc-panel[hidden], .sdc-tease[hidden] { display: none; }

@keyframes sdc-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.sdc-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 12px 14px 16px;
    background: linear-gradient(135deg, #0E1F3B, var(--sdc-navy));
    color: #fff;
}

.sdc-head__logo { width: 36px; height: 36px; padding: 4px; border-radius: 10px; background: #fff; object-fit: contain; }
.sdc-head__text { flex: 1 1 auto; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sdc-head__text strong { font-size: 15.5px; }
.sdc-head__text span { font-size: 12px; opacity: .75; }
.sdc-head__btn { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: #fff; opacity: .8; cursor: pointer; }
.sdc-head__btn:hover { background: rgba(255, 255, 255, .12); opacity: 1; }

.sdc-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 14px;
    overflow-y: auto;
    background: var(--sdc-bg);
    scroll-behavior: smooth;
}

.sdc-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; word-wrap: break-word; animation: sdc-in .2s ease; }
.sdc-msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--sdc-line); border-bottom-left-radius: 4px; }
.sdc-msg--me { align-self: flex-end; background: var(--sdc-navy); color: #fff; border-bottom-right-radius: 4px; }
.sdc-msg--wide { max-width: 100%; width: 100%; padding: 0; border: 0; background: transparent; }
.sdc-msg ul { margin: 6px 0 4px; padding-left: 18px; }
.sdc-msg li { margin: 2px 0; }
.sdc-msg a { color: var(--sdc-blue); font-weight: 600; }
.sdc-msg--me a { color: #fff; }

.sdc-typing { display: flex; gap: 4px; padding: 12px 14px; }
.sdc-typing span { width: 7px; height: 7px; border-radius: 50%; background: #A9B6C8; animation: sdc-dot 1s infinite ease-in-out; }
.sdc-typing span:nth-child(2) { animation-delay: .15s; }
.sdc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes sdc-dot { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

.sdc-chips { display: flex; flex-wrap: wrap; gap: 7px; }

.sdc-chip {
    padding: 8px 13px;
    border: 1.5px solid #C9D5E5;
    border-radius: 999px;
    background: #fff;
    color: var(--sdc-navy);
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.sdc-chip:hover { border-color: var(--sdc-navy); background: #EEF3FA; color: var(--sdc-navy); text-decoration: none; }
.sdc-chip.is-main { border-color: var(--sdc-orange); background: var(--sdc-orange); color: #fff; }
.sdc-chip.is-main:hover { background: #D45A2A; border-color: #D45A2A; color: #fff; }

.sdc-cards { display: grid; gap: 8px; }

.sdc-card { display: flex; gap: 10px; padding: 10px; border: 1px solid var(--sdc-line); border-radius: 12px; background: #fff; }
.sdc-card img, .sdc-card__noimg { flex: 0 0 72px; width: 72px; height: 60px; border-radius: 8px; background: var(--sdc-bg); object-fit: contain; }
.sdc-card__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sdc-card__body strong { font-size: 14px; line-height: 1.3; }
.sdc-card__body > span { font-size: 12px; color: var(--sdc-muted); }
.sdc-card__acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: 13px; }
.sdc-card__acts a { color: var(--sdc-blue); font-weight: 700; }
.sdc-card__acts button { padding: 0; border: 0; background: none; color: var(--sdc-orange); font: inherit; font-weight: 700; cursor: pointer; }
.sdc-cards__more { margin: 2px 0 0; font-size: 13px; }

.sdc-form { display: grid; gap: 9px; padding: 14px; border: 1px solid var(--sdc-line); border-radius: 14px; background: #fff; }
.sdc-f { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.sdc-f span { font-size: 12.5px; font-weight: 700; color: var(--sdc-ink); }
.sdc-f b { color: var(--sdc-orange); }

.sdc-f input, .sdc-f textarea, .sdc-f select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #CDD8E6;
    border-radius: 9px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    color: var(--sdc-ink);
}

.sdc-f input:focus, .sdc-f textarea:focus, .sdc-f select:focus { outline: 0; border-color: var(--sdc-blue); box-shadow: 0 0 0 3px rgba(18, 74, 154, .14); }
.sdc-hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; }
.sdc-note { margin: 0; font-size: 11.5px; color: var(--sdc-muted); }
.sdc-err { margin: 0; padding: 8px 10px; border-radius: 8px; background: #FBEDEC; color: #8E2A23; font-size: 13px; font-weight: 600; }
.sdc-err[hidden] { display: none; }

.sdc-send { padding: 11px 14px; border: 0; border-radius: 10px; background: var(--sdc-orange); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.sdc-send:hover { background: #D45A2A; }
.sdc-send:disabled { opacity: .7; cursor: wait; }

.sdc-ask { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--sdc-line); background: #fff; }
.sdc-ask input { flex: 1 1 auto; min-width: 0; padding: 11px 13px; border: 1px solid #CDD8E6; border-radius: 12px; font: inherit; font-size: 14px; }
.sdc-ask input:focus { outline: 0; border-color: var(--sdc-blue); box-shadow: 0 0 0 3px rgba(18, 74, 154, .14); }
.sdc-ask button { flex: 0 0 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--sdc-navy); color: #fff; cursor: pointer; }
.sdc-ask button:hover { background: var(--sdc-blue); }

@media (max-width: 575.98px) {
    #sd-chat { right: 14px; bottom: 14px; }
    .sdc-launch__text { display: none; }
    .sdc-launch { padding: 12px; }
    #sd-chat.is-open .sdc-panel {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        height: 100dvh;
        border-radius: 0;
    }
    #sd-chat.is-open .sdc-launch { display: none; }
    .sdc-msg { max-width: 92%; }
    .sdc-ask input, .sdc-f input, .sdc-f textarea, .sdc-f select { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .sdc-panel, .sdc-tease, .sdc-msg { animation: none; }
    .sdc-typing span { animation: none; }
    .sdc-launch { transition: none; }
}

/* Phone: country code then the number. */
.sdc-phone { display: flex; gap: 6px; }
.sdc-phone select { flex: 0 0 112px; width: 112px; padding: 9px 6px; border: 1px solid #CDD8E6; border-radius: 9px; background: #fff; font: inherit; font-size: 14px; color: var(--sdc-ink); }
.sdc-phone input { flex: 1 1 auto; min-width: 0; }
@media (max-width: 575.98px) { .sdc-phone select { font-size: 16px; } }
