/**
 * Self-nomination form styling
 * Uses Tailwind classes
 */

/* Modal animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Modal container */
.modal-container {
    animation: fadeIn 0.3s ease-out;
}

/* Modal content */
.modal-content {
    animation: slideUp 0.3s ease-out;
    max-height: 80vh;
    overflow-y: auto;
    margin: 2rem auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f8fafc;
    padding-right: 1rem;
}

/* Scrollbar styling for Webkit browsers */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: #cbd5e0;
    border-radius: 4px;
}

/* Form styling */
.form-page {
    transition: opacity 0.3s ease;
    padding-right: 0.5rem;
}

/* Improved form inputs */
.form-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input.error {
    border-color: #ef4444;
    background-color: #fff5f5;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 0.375rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

/* Form buttons */
.btn-primary {
    background-color: #B39351 !important;
    color: white !important;
    padding: 0.75rem 1rem;
    border-radius: 0;
    font-weight: 600;
    transition: background-color 0.15s ease-in-out;
    border: 1px solid #B39351 !important;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #9e7307 !important;
}

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background-color: transparent !important;
    color: #AE945B !important;
    padding: 0.75rem 1rem;
    border-radius: 0;
    font-weight: 500;
    transition: background-color 0.15s ease-in-out;
    border: 1px solid #AE945B !important;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: #AE945B !important;
    color: white !important;
}

.btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 231, 235, 0.4);
}

/* Checkboxes */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    margin-top: 1rem;
}

.checkbox-input {
    height: 1rem;
    width: 1rem;
    color: #4f46e5;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    margin-top: 0.25rem;
    margin-right: 0.5rem;
}

.checkbox-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

/* File upload */
.file-upload {
    position: relative;
}

.file-upload-label {
    display: inline-block;
    cursor: pointer;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.file-upload-label:hover {
    background-color: #f9fafb;
}

.file-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Success message */
.success-message {
    text-align: center;
    padding: 2rem;
    border-radius: 0.5rem;
    background-color: white;
    animation: fadeIn 0.5s ease-out, slideUp 0.5s ease-out;
}

.success-icon {
    margin: 0 auto;
    height: 4rem;
    width: 4rem;
    color: #22c55e;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% { 
        transform: scale(0); 
        opacity: 0; 
    }
    60% { 
        transform: scale(1.1); 
        opacity: 1; 
    }
    100% { 
        transform: scale(1); 
    }
}

/* Fix for modal height and positioning */
#self-nomination-modal {
    overflow-y: auto;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#self-nomination-modal.hidden {
    display: none !important;
}

#self-nomination-modal .flex.items-center {
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    display: flex !important;
    width: 100%;
    margin: 0;
}

#self-nomination-modal .modal-content {
    margin: 2rem auto;
    transform: translateY(0);
    max-height: 80vh;
    width: 100%;
}

/* Form buttons container */
.form-buttons-container {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    padding: 1rem 0;
    margin-top: 1rem;
    border-top: 1px solid #e5e7eb;
    z-index: 10;
}

/* Required field indicator */
.form-label[for] + input[required]::after,
.form-label[for] + textarea[required]::after,
.form-label[for] + select[required]::after {
    content: '*';
    color: #ef4444;
    margin-left: 0.25rem;
}

/* Error message styling */
.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .modal-content {
        padding: 1rem;
        max-height: 85vh;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    #self-nomination-modal .flex.items-center {
        padding: 1rem 0;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .form-page {
        max-height: 70vh !important;
    }
} 