/**
 * ORG Foundation - Volunteer Registration Form Styles
 * Version: 1.0.0
 * 
 * This file contains styles specific to the volunteer registration form
 * Works in conjunction with the main styles.css
 */

/* ===== VOLUNTEER SECTION ===== */
.volunteer-section {
    background: var(--white);
}

.volunteer-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-4xl);
}

.volunteer-intro h2 {
    color: var(--text);
    margin-bottom: var(--space-lg);
}

.volunteer-intro p {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* ===== VOLUNTEER FORM WRAPPER ===== */
.volunteer-form-wrapper {
    background: var(--gray-50);
    border-radius: var(--radius-2xl);
    padding: var(--space-3xl);
    box-shadow: var(--shadow-card);
}

/* ===== FORM SECTIONS ===== */
.form-section {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin-bottom: var(--space-2xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.form-section:hover {
    box-shadow: var(--shadow-md);
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-lg);
    border-bottom: 2px solid var(--gray-100);
}

.form-section-number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-section-title h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: var(--space-xs);
}

.form-section-title p {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin: 0;
}

/* ===== FORM ROWS ===== */
.form-row {
    margin-bottom: var(--space-lg);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-lg);
}

/* ===== CHECKBOX GRID ===== */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
}

.form-checkbox-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.form-checkbox-item:hover {
    border-color: var(--primary-dark);
    background: var(--primary-light);
}

.form-checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-dark);
}

.form-checkbox-item input[type="checkbox"]:checked + label {
    font-weight: 500;
    color: var(--primary-dark);
}

.form-checkbox-item label {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--text);
    cursor: pointer;
    margin: 0;
}

/* ===== CHECKBOX BLOCK (for consent) ===== */
.form-checkbox-block {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--primary-light);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.form-checkbox-block:hover {
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.form-checkbox-block input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-dark);
}

.form-checkbox-block label {
    flex: 1;
    font-size: 1rem;
    color: var(--text);
    cursor: pointer;
    line-height: 1.6;
}

.form-checkbox-block label strong {
    color: var(--primary-dark);
}

/* ===== FORM SUBMIT SECTION ===== */
.form-submit-section {
    text-align: center;
    padding-top: var(--space-2xl);
}

.form-submit-btn {
    min-width: 300px;
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ===== FORM VALIDATION ERRORS ===== */
.form-group.error .form-input,
.form-group.error .form-select,
.form-group.error .form-textarea {
    border-color: var(--error);
    animation: shake 0.3s ease;
}

.form-group.error .form-checkbox-item {
    border-color: var(--error);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ===== SUCCESS & ERROR MESSAGES ===== */
.form-message {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    margin-top: var(--space-xl);
    display: none;
    text-align: center;
    animation: slideIn 0.5s ease;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 2px solid var(--success);
    display: block;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 2px solid var(--error);
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== LOADING STATE ===== */
.form-submit-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.form-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    left: 50%;
    margin-left: -12px;
    margin-top: -12px;
    border: 3px solid var(--white);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .volunteer-form-wrapper {
        padding: var(--space-2xl);
    }
    
    .form-section {
        padding: var(--space-xl);
    }
    
    .form-section-header {
        gap: var(--space-md);
    }
    
    .form-section-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .volunteer-form-wrapper {
        padding: var(--space-lg);
        border-radius: var(--radius-xl);
    }
    
    .form-section {
        padding: var(--space-lg);
        margin-bottom: var(--space-xl);
    }
    
    .form-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .form-section-number {
        width: 45px;
        height: 45px;
        font-size: 1.125rem;
    }
    
    .form-row-2,
    .form-row-3 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
        padding: var(--space-md);
    }
    
    .form-submit-btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .volunteer-intro {
        margin-bottom: var(--space-2xl);
    }
    
    .volunteer-intro h2 {
        font-size: 1.75rem;
    }
    
    .volunteer-intro p {
        font-size: 1rem;
    }
    
    .volunteer-form-wrapper {
        padding: var(--space-md);
    }
    
    .form-section {
        padding: var(--space-md);
    }
    
    .form-section-title h3 {
        font-size: 1.25rem;
    }
    
    .form-section-title p {
        font-size: 0.875rem;
    }
    
    .form-checkbox-block {
        padding: var(--space-md);
    }
    
    .checkbox-grid {
        gap: var(--space-sm);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .footer,
    .scroll-top,
    .form-submit-btn {
        display: none;
    }
    
    .form-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .volunteer-form-wrapper {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: 3px solid var(--primary-dark);
    outline-offset: 2px;
}

.form-checkbox-item:focus-within {
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
}

.form-checkbox-block:focus-within {
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
}

/* ===== DARK MODE SUPPORT (Optional) ===== */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed in the future */
}