/* Event Registration Modal Styles */

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.registration-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px) scale(0.9);
    transition: all 0.3s ease;
    position: relative;
}

.modal-backdrop.active .registration-modal {
    transform: translateY(0) scale(1);
}

/* Modal Header */
.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: white;
    border-radius: 12px 12px 0 0;
    z-index: 1;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.event-modal-info {
    padding-right: 3rem;
}

.event-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.event-modal-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.event-modal-detail {
    display: flex;
    align-items: center;
    color: #6b7280;
    font-size: 0.9rem;
}

.event-modal-detail i {
    margin-right: 0.5rem;
    color: var(--primary-color);
    width: 16px;
}

/* Modal Body */
.modal-body {
    padding: 1.5rem 2rem 2rem;
}

/* Alert Messages */
.modal-alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.modal-alert i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.modal-alert.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.modal-alert.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.modal-alert.warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Capacity Info */
.modal-capacity-info {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.modal-capacity-info i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Form Styles */
.modal-form {
    margin-top: 1rem;
}

.modal-form-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.modal-form-title i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.modal-form-group {
    margin-bottom: 1.25rem;
}

.modal-form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.modal-form-input,
.modal-form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.modal-form-input:focus,
.modal-form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-form-textarea {
    resize: vertical;
    min-height: 80px;
    max-height: 120px;
}

/* Submit Button */
.modal-register-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-register-btn:hover:not(:disabled) {
    background: #1e40af;
    transform: translateY(-1px);
}

.modal-register-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-register-btn.loading {
    position: relative;
}

.modal-register-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Back Link */
.modal-back-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.modal-back-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.modal-back-link a:hover {
    color: #1e40af;
}

/* Loading State */
.modal-loading {
    text-align: center;
    padding: 2rem;
}

.modal-loading i {
    font-size: 2rem;
    color: var(--primary-color);
    animation: spin 1s linear infinite;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .modal-backdrop {
        padding: 0.5rem;
    }
    
    .registration-modal {
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
        border-radius: 8px 8px 0 0;
    }
    
    .modal-body {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .event-modal-info {
        padding-right: 2.5rem;
    }
    
    .event-modal-title {
        font-size: 1.3rem;
    }
    
    .event-modal-details {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .modal-backdrop {
        padding: 0;
    }
    
    .registration-modal {
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }
    
    .modal-header {
        border-radius: 0;
    }
    
    .modal-header,
    .modal-body {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .event-modal-info {
        padding-right: 2rem;
    }
}