:root {
    --green: #4caf50;
    --green-dark: #45a049;
    --text: #333;
    --muted: #888;
    --bot-bg: #f1f1f1;
    --bot-border: #ddd;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f9f9f9;
    color: var(--text);
    height: 100vh;
    height: 100dvh; /* mobile browsers: ignore collapsing URL bar */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ---------- chat ---------- */
#chat-container {
    width: 100%;
    height: 88%;
    margin: 10px 10px 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#chat-box {
    flex-grow: 1;
    margin-bottom: 20px;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#chat-box::-webkit-scrollbar { display: none; }

.msg {
    position: relative;
    max-width: 80%;
    margin: 15px 0 15px 10px;
    padding: 12px 18px;
    border-radius: 25px;
    font-size: 16px;
    line-height: 1.5;
}

.msg--bot {
    margin-right: 50px;
    background: var(--bot-bg);
    border: 1px solid var(--bot-border);
}

.msg--user {
    width: auto;
    margin-left: 50px;
    margin-right: 10px;
    background: var(--green);
    border: 1px solid var(--green);
    color: #fff;
    text-align: center;
}

.answers {
    display: flex;
    flex-direction: column;
    margin: 20px 10px 0 50px;
    opacity: 0;
    transition: opacity .5s ease;
}
.answers.is-visible { opacity: 1; }
.answers a { text-decoration: none; }

.answers button {
    width: 100%;
    margin: 5px 0;
    padding: 12px 18px;
    border: 0;
    border-radius: 50px;
    background: var(--green);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color .3s ease, transform .2s ease;
}
.answers button:hover { background: var(--green-dark); transform: translateY(-2px); }
.answers button:active { transform: translateY(1px); }

/* typing indicator */
.typing { display: flex; margin: 20px; }
.typing span {
    width: 8px;
    height: 8px;
    margin: 0 3px;
    border-radius: 50%;
    background: #bbb;
    animation: dot 1.5s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: .3s; }
.typing span:nth-child(3) { animation-delay: .6s; }
@keyframes dot { 50% { transform: scale(1.5); } }


/* ---------- footer ---------- */
.legal-links {
    align-self: flex-start;
    font-size: 13px;
    color: var(--muted);
}
.legal-links a { margin: 0 10px; color: var(--muted); text-decoration: none; }

.disclosure {
    margin: 6px 10px 8px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--muted);
}
