/* Scoped Ho2 Academy chat widget — avoids overriding website styles. */
.ho2-chat {
    --ho2-blue: #12649b;
    --ho2-blue-dark: #0c4e7e;
    --ho2-ink: #182b3d;
    --ho2-muted: #617387;
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1100;
    font-family: system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
    font-size: 14px;
    color: var(--ho2-ink)
}

    .ho2-chat * {
        box-sizing: border-box
    }

    .ho2-chat button {
        cursor: pointer;
        font: inherit
    }

        .ho2-chat button:focus-visible, .ho2-chat input:focus-visible, .ho2-chat a:focus-visible {
            outline: 3px solid #f9b83e;
            outline-offset: 3px
        }

.ho2-chat-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--ho2-blue);
    color: white;
    border: 0;
    border-radius: 100px;
    padding: 13px 19px;
    font-weight: 650;
    box-shadow: 0 8px 26px #0a477a45;
    transition: transform .15s,background .15s
}

    .ho2-chat-toggle:hover {
        background: var(--ho2-blue-dark);
        transform: translateY(-1px)
    }

    .ho2-chat-toggle::before {
        content: '✦';
        display: grid;
        place-items: center;
        width: 24px;
        height: 24px;
        border: 1.5px solid #ffffffbb;
        border-radius: 50%;
        font-size: 15px
    }

.ho2-chat-panel {
    width: min(410px,calc(100vw - 28px));
    height: min(620px,calc(100dvh - 115px));
    min-height: 300px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #dbe5ef;
    border-radius: 18px;
    box-shadow: 0 16px 50px #17334b35;
    overflow: hidden;
    margin-bottom: 12px
}

    .ho2-chat-panel[hidden] {
        display: none !important
    }

.ho2-chat-header {
    display: flex;
    align-items: center;
    gap: 11px;
    background: linear-gradient(120deg,#12649b,#0d5289);
    color: #fff;
    padding: 16px 18px;
    flex-shrink: 0
}

    .ho2-chat-header::before {
        content: '✦';
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        border-radius: 12px;
        background: #ffffff26;
        font-size: 21px;
        flex-shrink: 0
    }

.ho2-chat-header-title {
    flex: 1;
    min-width: 0
}

    .ho2-chat-header-title strong {
        display: block;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.25
    }

    .ho2-chat-header-title small {
        display: block;
        color: #e0f3ff;
        font-size: 11px;
        margin-top: 3px
    }

.ho2-chat-header button {
    background: #ffffff15;
    border: 0;
    color: #fff;
    border-radius: 10px;
    width: 34px;
    height: 34px;
    font-size: 23px;
    line-height: 1;
    flex-shrink: 0
}

    .ho2-chat-header button:hover {
        background: #ffffff35
    }

.ho2-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #f8fafc;
    padding: 19px 14px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: #c6d3de transparent
}

.ho2-chat-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 100%;
    flex-shrink: 0
}

.ho2-chat-row-user {
    justify-content: flex-end
}

.ho2-chat-avatar {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #e3eff9;
    color: var(--ho2-blue);
    display: grid;
    place-items: center;
    font-size: 17px;
    flex-shrink: 0
}

.ho2-chat-message {
    max-width: calc(100% - 35px);
    padding: 12px 14px;
    border-radius: 15px;
    font-size: 13.5px;
    line-height: 1.58;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0
}

.ho2-chat-bot {
    background: #fff;
    color: var(--ho2-ink);
    border: 1px solid #e5ebf2;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 7px #1b33400a
}

.ho2-chat-user {
    background: var(--ho2-blue);
    color: #fff;
    border-bottom-right-radius: 5px
}

.ho2-chat-link {
    color: #075a96;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
    overflow-wrap: anywhere
}

    .ho2-chat-link:hover {
        color: #043b66
    }

.ho2-chat-thinking {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ho2-muted)
}

.ho2-chat-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px
}

    .ho2-chat-dots i {
        display: block;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: #4388b5;
        animation: ho2-dot 1.1s infinite ease-in-out
    }

        .ho2-chat-dots i:nth-child(2) {
            animation-delay: .16s
        }

        .ho2-chat-dots i:nth-child(3) {
            animation-delay: .32s
        }

@keyframes ho2-dot {
    0%,60%,100% {
        opacity: .3;
        transform: translateY(0)
    }

    30% {
        opacity: 1;
        transform: translateY(-4px)
    }
}

.ho2-chat-form {
    display: flex;
    gap: 9px;
    align-items: center;
    border-top: 1px solid #e4ebf1;
    padding: 12px;
    background: #fff;
    flex-shrink: 0
}

    .ho2-chat-form input {
        min-width: 0;
        flex: 1;
        border: 1px solid #d8e2eb;
        border-radius: 12px;
        padding: 12px 13px;
        font-size: 13.5px;
        color: var(--ho2-ink);
        background: #fff
    }

        .ho2-chat-form input::placeholder {
            color: #8797a7
        }

    .ho2-chat-form button {
        border: 0;
        background: var(--ho2-blue);
        color: #fff;
        border-radius: 12px;
        padding: 12px 16px;
        font-weight: 650;
        min-height: 43px
    }

        .ho2-chat-form button:hover:not(:disabled) {
            background: var(--ho2-blue-dark)
        }

        .ho2-chat-form button:disabled {
            opacity: .5;
            cursor: wait
        }

.ho2-chat-note {
    padding: 0 15px 12px;
    color: #728194;
    font-size: 10.5px;
    line-height: 1.45;
    text-align: center;
    background: #fff
}

@media(max-width:600px) {
    .ho2-chat {
        right: 12px;
        bottom: 12px
    }

    .ho2-chat-panel {
        height: min(640px,calc(100dvh - 92px));
        width: calc(100vw - 24px)
    }

    .ho2-chat-message {
        font-size: 14px
    }
}

@media(prefers-reduced-motion:reduce) {
    .ho2-chat-dots i, .ho2-chat-toggle {
        animation: none;
        transition: none
    }
}
