/* form.css */
:root {
    --primary-color: #1E3A8A;  /* Deep blue for trust */
    --secondary-color: #C4A747; /* Gold accent for cultural connection */
    --background-color: #F8FAFC; /* Light background */
    --text-color: #2D3748;
    --error-color: #DC2626;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    background: var(--primary-color);
    color: var(--text-color);
    margin: 0;
    padding: 2rem;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.2em;
}

h3 {
    color: var(--secondary-color);
    margin: 1.5rem 0;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

/* Progress Bar */
.progress-bar {
    height: 10px;
    background: #E2E8F0;
    border-radius: 5px;
    margin: 2rem 0;
}

.progress {
    height: 100%;
    background: var(--secondary-color);
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* Form Sections */
.demographic-section,
.question-section {
    background: #F8FAFC;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 1px solid #E2E8F0;
}

label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    margin-top: 0.5rem;
    border: 2px solid #CBD5E0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Rating Scale */
.rating-scale {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
}

.rating-scale label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
}

/* Custom Radio/Checkboxes */
.single-choice,
.options {
    display: grid;
    gap: 1rem;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    background: white;
    border: 2px solid #CBD5E0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-option:hover {
    border-color: var(--primary-color);
}

input[type="radio"]:checked + .radio-label {
    font-weight: 600;
    color: var(--primary-color);
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.prev-btn {
    background: #CBD5E0;
    color: var(--text-color);
}

.next-btn {
    background: var(--primary-color);
    color: white;
}

.submit-btn {
    background: var(--secondary-color);
    color: white;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Error Handling */
input:invalid,
textarea:invalid {
    border-color: var(--error-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.9em;
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .form-container {
        padding: 1rem;
    }
    
    .rating-scale {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
}

/* Add to form.css */
.question-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-navigation {
    position: sticky;
    bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}


.question-section {
    display: none;
}

/*.demographic-section.question-section {
    display: block; /* Initial state handled by JS */
}*/


.invalid {
    border-color: var(--error-color) !important;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

/* Add to form.css */
.invalid {
    border-color: #dc2626 !important;
    animation: shake 0.3s;
}

button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

.required-indicator {
    color: #dc2626;
    margin-left: 4px;
}


/* Add to form.css */
.question-section {
    display: none;
}

/*.question-section:first-of-type {
    display: block;
}*/

/* ADD this instead */
.question-section.active {
    display: block;
}

.form-navigation {
    position: sticky;
    bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
}


