.ig-assistant {
    --assistant-accent: #00c9a7;
    --assistant-navy: #0b1a30;
    position: fixed;
    bottom: max(20px, env(safe-area-inset-bottom));
    left: max(20px, env(safe-area-inset-left));
    z-index: 9000;
    font-family: Montserrat, Arial, sans-serif;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    pointer-events: none;
}
.ig-assistant__launcher, .ig-assistant__panel { pointer-events: auto; }
.ig-assistant *, .ig-assistant *::before { box-sizing: border-box; }
.ig-assistant [hidden] { display: none !important; }
.ig-assistant button, .ig-assistant select, .ig-assistant textarea {
    font: inherit;
    color: inherit;
}
.ig-assistant button { cursor: pointer; }
.ig-assistant button:disabled { cursor: wait; opacity: .55; }
.ig-assistant :is(button, select, textarea, a, summary):focus-visible {
    outline: 2px solid var(--assistant-accent);
    outline-offset: 3px;
}
.ig-assistant__launcher {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px 12px 12px;
    border: 1px solid #365269;
    border-radius: 40px;
    background: var(--assistant-navy);
    box-shadow: 0 8px 32px #0006;
    text-align: left;
}
.ig-assistant__mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--assistant-accent);
    color: #071525;
}
.ig-assistant__mark svg { width: 21px; height: 21px; }
.ig-assistant__launcher strong { display: block; font-size: 13px; font-weight: 600; }
.ig-assistant__launcher small { color: #b7c6d5; font-size: 11px; }
.ig-assistant__panel {
    display: flex;
    flex-direction: column;
    /* The site's mobile section reset uses !important. Keep dialog spacing local. */
    padding: 0 !important;
    width: 390px;
    max-width: calc(100vw - 40px);
    height: 620px;
    max-height: calc(100dvh - 40px);
    overflow: auto;
    background: var(--assistant-navy);
    border: 1px solid #365269;
    border-radius: 22px;
    box-shadow: 0 16px 64px #0008;
}
.ig-assistant__panel > :not(.ig-assistant__messages) { flex-shrink: 0; }
.ig-assistant__header { display: flex; align-items: center; gap: 12px; padding: 20px 18px 12px; }
.ig-assistant__identity { flex: 1; min-width: 0; }
.ig-assistant__identity h2 { font-size: 16px !important; font-weight: 600; line-height: 1.35; margin: 0 0 3px; letter-spacing: 0; }
.ig-assistant__identity p { font-size: 11px; color: #b7c6d5; margin: 0; }
.ig-assistant__icon-button { width: 36px; height: 36px; padding: 6px; border: 1px solid #365269; border-radius: 50%; background: transparent; flex: 0 0 auto; }
.ig-assistant__icon-button svg { display: block; width: 20px; height: 20px; }
.ig-assistant__toolbar { display: flex; gap: 12px; justify-content: space-between; padding: 0 18px 14px; border-bottom: 1px solid #25465b; }
.ig-assistant__modes { display: flex; gap: 4px; padding: 3px; background: #071525; border-radius: 10px; }
.ig-assistant__modes button { padding: 6px 13px; background: transparent; border: 0; border-radius: 7px; font-size: 12px; }
.ig-assistant__modes button[aria-pressed="true"] { background: #21435a; color: #fff; }
.ig-assistant select { min-width: 68px; border: 1px solid #365269; background: #0b1a30; border-radius: 9px; padding: 4px 8px; font-size: 12px; }
.ig-assistant__privacy { margin: 0; padding: 10px 18px 0; color: #b7c6d5; font-size: 12px; line-height: 1.6; }
.ig-assistant__privacy summary { width: fit-content; cursor: pointer; }
.ig-assistant__privacy summary::marker { color: var(--assistant-accent); }
.ig-assistant__privacy p { margin: 8px 0 0; font-size: 12px; color: inherit; }
.ig-assistant__privacy a { color: #62ddc9; text-decoration: underline; }
.ig-assistant__messages { flex: 1; min-height: 65px; overflow-y: auto; overscroll-behavior: contain; padding: 18px; scrollbar-width: thin; scrollbar-color: #365269 transparent; }
.ig-assistant__message { margin: 0 22px 16px 0; }
.ig-assistant__speaker { display: block; margin-bottom: 5px; color: #b7c6d5; font-size: 10px; }
.ig-assistant__message p { margin: 0; padding: 11px 13px; background: #17344c; color: #edf4fb; border-radius: 0 13px 13px; font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.ig-assistant__message--user { margin: 0 0 16px 22px; }
.ig-assistant__message--user .ig-assistant__speaker { text-align: right; }
.ig-assistant__message--user p { background: #0b4b46; border-radius: 13px 0 13px 13px; }
.ig-assistant__status { padding: 0 18px; margin: 0 0 10px; color: #b7c6d5; font-size: 11px; }
.ig-assistant__status[data-error="true"] { color: #ffb4b4; }
.ig-assistant__voice { padding: 0 18px; }
.ig-assistant__voice > p { margin: 0 0 10px; font-size: 12px; color: #b7c6d5; }
.ig-assistant__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ig-assistant__actions button { border: 1px solid #365269; border-radius: 9px; padding: 9px 12px; font-size: 12px; margin-bottom: 12px; background: #17344c; }
.ig-assistant__actions [data-assistant-call] { flex: 1; background: var(--assistant-accent); border-color: var(--assistant-accent); color: #071525; font-weight: 600; }
.ig-assistant__actions [data-assistant-end] { border-color: #985d69; color: #ffcbd4; }
.ig-assistant__form { display: flex; align-items: end; gap: 8px; padding: 12px 14px; border-top: 1px solid #25465b; }
.ig-assistant textarea { flex: 1; min-width: 0; resize: none; height: 44px; max-height: 90px; padding: 11px 12px; border: 1px solid #365269; border-radius: 10px; background: #071525; font-size: 13px; line-height: 20px; }
.ig-assistant textarea::placeholder { color: #a3b5c7; }
.ig-assistant__send { width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--assistant-accent); color: #071525 !important; }
.ig-assistant__send svg { width: 19px; height: 19px; vertical-align: middle; }
@media (max-width: 480px) {
    .ig-assistant { left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
    .ig-assistant__panel { width: 100%; max-width: 100%; max-height: calc(100dvh - 24px); border-radius: 18px; }
    .ig-assistant__launcher { width: 52px; height: 52px; padding: 6px; justify-content: center; border-radius: 50%; }
    .ig-assistant__launcher > span:last-child { display: none; }
    .ig-assistant__header { padding: 16px 14px 12px; gap: 9px; }
    .ig-assistant__header .ig-assistant__mark { display: none; }
    .ig-assistant__toolbar { padding-inline: 14px; gap: 8px; }
    .ig-assistant__privacy { padding: 10px 14px 0; }
}
