/* Existing styles */
body {
    font-family: Arial, sans-serif;
    background-color: #FFFFFF;
    color: #466D6C;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 900px;
    margin: auto;
    background-color: #EFF2F2;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 200px;
    height: auto;
}

.main {
    margin-bottom: 20px;
}

/* Adding spacing between form elements (textarea, button, label) */
textarea, button, label {
    display: block;
    margin: 15px 0;
}

textarea#prompt {
    width: 100%;
    height: 150px;
    padding: 10px;
    border: 1px solid #B8DCD2;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 20px;
}

textarea#saniprompt {
    width: 100%;
    height: 150px;
    padding: 10px;
    border: 1px solid #B8DCD2;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 20px;
}

button#submit {
    padding: 10px 20px;
    background-color: #466D6C;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 20px;
}

button#submit:hover {
    background-color: #3B5958;
}

.response-box {
    width: 100%;
    padding: 10px;
    background-color: #B8DCD2;
    color: #466D6C;
    border: none;
    border-radius: 4px;
    min-height: 150px; /* Ensure this doesn't collapse */
    margin-top: 20px;
}

/* New additions */
textarea {
    min-height: 150px;  /* Ensures prompt and saniprompt boxes keep their size */
}

#response-content {
    min-height: 120px;  /* Ensures response box doesn't collapse */
    background-color: transparent;
    padding: 10px;
    color: #466D6C;
    border-radius: 4px;
}

#loading-spinner {
    font-style: italic;
    color: #555;
    margin-top: 10px;
}

/* Keep 'View Logs' button in line with Submit */
.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

button#view-logs {
    padding: 10px 20px;
    background-color: #466D6C;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 20px;
}

button#view-logs:hover {
    background-color: #3B5958;
}

.status-grid {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Adjustments for mobile responsiveness */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 15px;
    }

    textarea#prompt, textarea#saniprompt, .response-box {
        height: 120px;
    }
}

/* Spinner styling */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #466D6C;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: none;  /* Hidden by default */
    margin-left: 5px;  /* Smaller space between button and spinner */
    vertical-align: middle;  /* Align spinner with the button */
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Additional spacing between the "Submit" button and the "Sanitized Prompt" label */
label[for="saniprompt"] {
    margin-top: 20px;
}
