
/* === START Modern Sign-Up CSS === */

/* General Form Container Styling */
.signup-form {
    /* Use max-width for responsiveness, replacing the fixed width */
    max-width: 800px;
    margin: 40px auto; /* Center the form on the page */
    padding: 20px;
    border: 1px solid #ccc; /* Simple border */
    border-radius: 8px; /* Rounded corners */
    font-family: Arial, sans-serif;
}

/* Grouping standard input fields into a grid-like layout */
.form-group-container {
    display: grid;
    /* Create two columns for standard fields on large screens */
    grid-template-columns: 1fr 1fr;
    gap: 20px; /* Space between fields */
    margin-bottom: 20px;
}

/* Individual form field styling */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* --- Personality Questionnaire Section Styling --- */

.personality-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
}

.personality-section .section-title {
    text-align: center;
    margin-bottom: 15px;
    color: #007bff;
}

.likert-scale-label {
    text-align: center;
    font-style: italic;
    margin-bottom: 20px;
}

/* Styling for each question group */
.question-group {
    display: flex;
    justify-content: space-between; /* Puts label on left, radios on right */
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dotted #ccc;
}

.question-group:last-child {
    border-bottom: none;
}

.question-group label {
    flex-basis: 70%; /* Give the question text more space */
    font-weight: normal;
}

.radio-options {
    flex-basis: 30%; /* Space for radio buttons */
    display: flex;
    justify-content: space-around; /* Spread out the 1-5 options */
}

.radio-options label {
    /* Style for the '1', '2', '3', etc. labels */
    font-weight: bold;
    cursor: pointer;
    padding: 0 5px 10px; /* Increased padding */
    border: 1px solid #ccc; /* Add border */
    border-radius: 4px; /* Slight rounding */
    margin: 0 2px; /* Small gap between options */
    background-color: #fff; /* White background */
    transition: background-color 0.1s;
}

/* Target the LABEL when it contains a checked radio input */
.radio-options label:has(input[type="radio"]:checked) {
    background-color: #007bff; /* Blue fill */
    color: white; /* White text */
    border-color: #007bff; /* Blue border */
}

/* ➡️ NEW RULE 1: Hover effect (optional, but nice) */
.radio-options label:hover {
    background-color: #e9ecef; /* Light gray on hover */
}

/* ➡️ NEW RULE 2: Selected state (CRITICAL FIX) */
.radio-options input[type="radio"]:checked + label {
    background-color: #007bff; /* Blue fill */
    color: white; /* White text */
    border-color: #007bff; /* Blue border */
}


.radio-options input[type="radio"] {
    /* Hide default radio button to style the text label */
    display: none;
}

/* Checkbox and Rules Styling */
.form-rules-section {
    margin-top: 30px;
}

.checkbox-group {
    flex-direction: row; /* Forces checkbox and label onto the same line */
    align-items: center;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
}

.rules-list-container {
    margin-top: 20px;
    border: 1px dotted black;
    padding: 10px;
}

.rules-list-container .section-title {
    text-align: center;
    font-weight: bold;
}

/* Submission Button */
.form-actions {
    text-align: center;
    margin-top: 30px;
}

.button-primary {
    padding: 12px 25px;
    background-color: #28a745; /* Green button */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
}

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

/* --- Responsiveness: Stack columns on smaller screens --- */
@media (max-width: 650px) {
    .form-group-container {
        grid-template-columns: 1fr; /* Single column layout */
    }
    
    .question-group {
        flex-direction: column; /* Stack label and radio buttons vertically */
        align-items: flex-start;
        padding: 15px 0;
    }

    .question-group label {
        flex-basis: 100%;
        margin-bottom: 10px;
        font-weight: bold;
    }

    .radio-options {
        flex-basis: 100%;
        justify-content: space-between;
    }
}

/* === END Modern Sign-Up CSS === */