:root {
    color-scheme: light;
}

html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    /* no scrollbars */
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    font: 17px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background-image: url(https://unhsinc.org/wp-content/uploads/2025/08/25-year-banner.jpg);
    background-position: center center;
    background-size: cover;
}

.chatbox {
    display: flex;
    width: 60%;
    height: 60%;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
    overflow: hidden;
}

@media (max-width:600px) {
    .chatbox {
        width: 90%;
        height: 90%;
    }

    body {
        background-size: auto;
    }
}


.chatbox__header {
    display: flex;
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgb(45, 45, 45);
    color: #fff;
}

#history {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fafafa;
    scroll-behavior: smooth;
}

.msg {
    display: block;
    max-width: 100%;
    padding: 10px 12px;
    margin: 0;
    border-radius: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.msg--bot {
    background: #ffffff;
    background: rgb(246, 246, 246);
    border: 1px solid #e5e7eb;
    color: #111827;
    border-top-left-radius: 4px;
}

.msg--user {
    background: rgb(49, 69, 175);
    color: #ffffff;
    border-top-right-radius: 4px;
    margin-left: auto;
}

.chatbox__input {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

.chatbox__input input[type="text"] {
    padding: 12px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font: inherit;
    outline: none;
    min-width: 0;
}

.chatbox__input input[type="text"]:focus {
    border-color: rgb(49, 69, 175);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.send-btn {
    padding: 0 14px;
    border: none;
    border-radius: 10px;
    background: rgb(39, 111, 181);
    color: #fff;
    font: 600 17px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    cursor: pointer;
}

.send-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.send-btn:hover:not(:disabled) {
    background: rgb(49, 69, 175);
}

.is-hidden {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .chatbox {
        animation: none;
    }
}