/* FFoA Volunteer Form Styles */
.ffoa-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.ffoa-form-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e5e9;
}

.ffoa-form-header h2 {
    color: #2c3e50;
    font-size: 2.2em;
    font-weight: 600;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ffoa-form-header p {
    color: #6c757d;
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Form Sections */
.form-section {
    margin-bottom: 30px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 25px;
    background: #fbfcfd;
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-color: #667eea;
}

.form-section legend {
    font-size: 1.3em;
    font-weight: 600;
    color: #2c3e50;
    padding: 0 15px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form Layout */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.half {
    flex: 1;
}

.form-group.third {
    flex: 1;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Labels */
.form-group label,
.checkbox-label,
.radio-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.checkbox-label:hover {
    color: #667eea;
}

/* Form Controls */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95em;
    transition: all 0.2s ease;
    background-color: #fff;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background-color: #fff;
}

textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Radio and Checkbox Groups */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.radio-group label,
.checkbox-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.radio-group label:hover,
.checkbox-group label:hover {
    background-color: #f3f4f6;
}

.radio-group input[type="radio"],
.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: auto;
    transform: scale(1.2);
    accent-color: #667eea;
}

/* Error States */
.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.checkbox-group.error,
.radio-group.error {
    background-color: #fef2f2;
    border: 1px solid #ef4444;
    border-radius: 6px;
    padding: 12px;
}

/* Messages */
.ffoa-message {
    margin: 20px 0;
    padding: 16px 20px;
    border-radius: 8px;
    font-weight: 500;
}

.ffoa-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.ffoa-message.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.ffoa-message ul {
    margin: 0;
    padding-left: 20px;
}

.ffoa-message li {
    margin-bottom: 5px;
}

/* Submit Button */
.form-submit {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e1e5e9;
}

.ffoa-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.ffoa-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.ffoa-submit-btn:active {
    transform: translateY(0);
}

.ffoa-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

/* Character Counter */
.char-counter {
    font-size: 12px;
    color: #6b7280;
    text-align: right;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ffoa-form-container {
        margin: 10px;
        padding: 20px 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-section {
        padding: 20px 15px;
    }
    
    .ffoa-form-header h2 {
        font-size: 1.8em;
    }
    
    .ffoa-form-header p {
        font-size: 1em;
    }
    
    .ffoa-submit-btn {
        width: 100%;
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .ffoa-form-container {
        margin: 5px;
        padding: 15px 10px;
    }
    
    .form-section {
        padding: 15px 10px;
    }
    
    .ffoa-form-header h2 {
        font-size: 1.6em;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        padding: 14px 12px;
    }
}

/* Loading Animation */
.ffoa-submit-btn.loading {
    position: relative;
    color: transparent;
}

.ffoa-submit-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Admin Styles */
.volunteer-details table {
    margin-bottom: 20px;
}

.volunteer-details th {
    width: 200px;
    padding: 10px;
    background-color: #f8f9fa;
    font-weight: 600;
}

.volunteer-details td {
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
}

.status-select {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Accessibility Improvements */
.form-group label[for] {
    cursor: pointer;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ffoa-form-container {
        border: 2px solid #000;
    }
    
    .form-section {
        border: 2px solid #000;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select,
    textarea {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .ffoa-form-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .ffoa-submit-btn {
        display: none;
    }
    
    .form-section {
        break-inside: avoid;
    }
}