.status {
    padding: 10px 20px;
    background: #fff3cd;
    color: #856404;
    border-bottom: 1px solid #ffeaa7;
    text-align: center;
    font-size: 14px;
    height: 15px;
}

.chat-content {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0px 0px 0px 0px;
  background-color: #ffffff; /* optional – keep it consistent with site look */
  box-sizing: border-box;
  overflow-x: hidden;
  border-radius: 0 0 16px 16px; /* ← round bottom corners */
}

.chat-content h4 {
  margin-top: 0;
  font-size: 18px;
}

.chat-content p {
  font-size: 15px;
  line-height: 1.6;
  margin-top: 8px;
}

h4 {
  margin-bottom: 0;
}

.chat-scroll {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
}

.message {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message.assistant {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
}

.message.user .message-content {
    background: #417eaa;
    color: white;
}

.message.assistant .message-content {
    background: white;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.input-form {
    display: flex;
    gap: 10px;
    min-width: 0;   
}

.input-field {
    flex: 1 1 auto;
    min-width: 0;  
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
}

.input-field:focus {
    border-color: #417eaa;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.send-button {
    padding: 12px 24px;
    background: #417eaa;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.send-button:hover {
    background: #0056b3;
}

.send-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-style: italic;
}

.loading::after {
    content: "...";
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

@media (max-width: 600px) {

    body {
        padding: 5px;
    }

    .input-container {
        padding: 10px;
    }

}


.medal {
    font-size: 20px;
    vertical-align: middle;
    margin-right: 6px;
}

/* Resting the mouse on the first medal shows which AI model ranked the results (index.js sets data-tip). */
.medal-info {
    position: relative;
}

.medal-info::after {
    content: attr(data-tip);
    position: absolute;
    left: 0;
    bottom: calc(100% + 6px);
    z-index: 5;
    white-space: nowrap;
    pointer-events: none;
    background: #2c3e50;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.4;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(30, 20, 60, 0.22);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}

.medal-info:hover::after {  /* a short delay, so it doesn't flash when the mouse just passes over */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.15s ease 0.35s, visibility 0s linear 0.35s;
}

.message.pending .message-content {
    opacity: 0.7;
    font-style: italic;
}
