
* {
    box-sizing: border-box;
}

html{
    background: #f0f4f8;
    height: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f0f4f8;
    color: #333333;
    display: flex;
    flex-direction: column;
    height: 100vh;
    box-sizing: border-box;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.instruction-panel {
    width: 100%;
    background: #e6fffa;
    color: #333333;
    padding: 20px;
    box-sizing: border-box;
}

.chat-container {
    width: 100%;
    max-width: 900px;
    overflow-y: auto;
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.input-area {
    display: flex;
    padding: 12px;
    background: #edf2f7;
    border-top: 1px solid #cbd5e0;
}

.messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.outer-message{
    width: 100%;
}

.outer-message::after {
  content: "";
  display: table;
  clear: both;
}

.message {
    max-width: 90%;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.message.user {
    background: #3182ce; /* blue for user bubbles */
    color: #ffffff;
    align-self: flex-end; /* <-- this aligns the bubble to the right */
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 12px;
    float: right;
}

.message.assistant {
    background: #e2e8f0; /* light gray for assistant bubbles */
    color: #333333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 12px;
    float: left;
    min-width: 50px;
}

.input-area textarea {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: none;
    outline: none;
    font-size: 16px;
    resize: none; /* Disable manual resizing */
    overflow: hidden; /* Hide scrollbar */
}

input {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: none;
    outline: none;
    font-size: 16px;
}

button {
    margin-left: 10px;
    padding: 12px 18px;
    border-radius: 8px;
    border: none;
    background: #2b6cb0;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background: #2c5282;
}

.instruction{
    width: 50%;
    float: left;
    text-align: left;
}

.spot_image {
    width: 50%;
    float: right;
    text-align: right;
}

.spot_image img {
    display: inline-block;
    max-width: min(100%, 250px);
    height: auto;
}

.chat-container form {
    padding: 20px;
}

.likert-question {
    background: #f7fafc; /* light background for questions */
    border: 1px solid #cbd5e0;
    margin: 10px 0;
    padding: 12px;
    border-radius: 8px;
    color: #333333;
}

.likert-question legend {
    font-weight: bold;
    margin-bottom: 8px;
}

.likert-options {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.likert-options label {
    cursor: pointer;
    padding: 4px;
    user-select: none;
}

.likert-options input[type=radio] {
    margin-left: 4px;
}

button[type=submit] {
    width: 100%;
}

/* Modal for enlarged images */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.no-mar {
    margin: 0;
}