* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f2f2f2;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#chatbox {
    width: 100%;
    max-width: 420px;
    height: 700px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: auto;
}

#messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.message-wrapper {
    margin: 8px 0;
    font-size: 14px;
}

.message-label {
    font-size: 11px;
    font-weight: bold;
    color: #666;
    margin-bottom: 2px;
}

.message-bubble.bot {
    align-self: flex-start;
    background-color: #ffe0f2;
    color: #000;
    padding: 10px 14px;
    border-radius: 16px 16px 16px 4px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-bubble.user {
    align-self: flex-end;
    background-color: #e0f5d6;
    color: #000;
    padding: 10px 14px;
    border-radius: 16px 16px 4px 16px;
    line-height: 1.4;
    word-wrap: break-word;
}

#inputArea {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #ccc;
    background: #fff;
}

#userInput {
    width: 100%;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid #ccc;
    font-size: 14px;
    outline: none;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: space-between;
}

button {
    flex: 1;
    padding: 10px;
    font-size: 13px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    min-width: 100px;
    transition: background-color 0.2s ease;
}

/* Send button (default primary) */
#sendButton {
    background-color: #007bff;
    color: white;
}

#sendButton:hover {
    background-color: #0056b3;
}

/* Reset button (red style) */
#resetButton {
    background-color: #dc3545;
    color: white;
}

#resetButton:hover {
    background-color: #c82333;
}

/* Submit button (teal style) */
#submitButton {
    background-color: #17a2b8;
    color: white;
}

#submitButton:hover {
    background-color: #138496;
}

/* Yes/No response buttons */
.response-button {
    margin-top: 8px;
    margin-right: 6px;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 14px;
    border: none;
    background-color: #28a745;
    color: white;
    cursor: pointer;
}

.response-button:hover {
    background-color: #218838;
}

/* Mobile screens: use full height and width */
@media (max-width: 480px) {
    body {
        align-items: flex-start;
    }

    #chatbox {
        height: 100vh;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
    }
}

.response-button {
    margin: 4px;
    padding: 6px 12px;
    font-size: 1em;
    cursor: pointer;
}

.secondary-button {
    background-color: #ccc;
}

.button-wrapper {
    margin-top: 8px;
}