/* Quota Selection Modal Styling - Pure CSS/JS Solution */

/* Modal Overlay */
#quotaSelectionModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

#quotaSelectionModal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Dialog */
.modal-dialog {
    width: 90%;
    max-width: 900px;
    margin: 2rem auto;
    position: relative;
}

.modal-content {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Modal Header Gradient */
.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 1.5rem;
    border-radius: 0.75rem 0.75rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header .modal-title {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
}

.modal-header .modal-title i {
    margin-right: 0.5rem;
}

.modal-header .close-modal {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.modal-header .close-modal:hover {
    opacity: 1;
}

/* Info Box Styling */
.info-box {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.info-box p {
    margin: 0;
    color: #1565c0;
    font-size: 0.875rem;
}

.info-box i {
    color: #2196f3;
    margin-right: 0.5rem;
}

/* Quota Grid Layout */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Quota Summary Box */
.quota-summary-box {
    background: linear-gradient(135deg, #f3e7ff 0%, #e3f2fd 100%);
    border: 1px solid #b39ddb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.quota-summary-box h6 {
    color: #4a148c;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.quota-summary-box ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.quota-summary-box ul li {
    padding: 0.25rem 0;
    color: #5e35b1;
    font-size: 0.875rem;
}

.quota-summary-box ul li strong {
    color: #4a148c;
}

/* Quota Card Styling */
.quota-card {
    border: 2px solid #dee2e6;
    border-radius: 0.75rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    position: relative;
}

.quota-card:hover {
    transform: translateY(-4px);
    border-color: #667eea;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
}

.quota-card.selected {
    border-color: #667eea !important;
    background: linear-gradient(135deg, #f3f4ff 0%, #e8eaff 100%) !important;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.quota-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.quota-card .fa-check-circle {
    color: #28a745;
    font-size: 1.25rem;
    margin-right: 0.5rem;
    display: none;
    transition: all 0.3s ease;
}

.quota-card.selected .fa-check-circle {
    display: inline-block !important;
}

.quota-card-description {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.quota-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quota-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.quota-badge-seats {
    background-color: #e3f2fd;
    color: #1565c0;
}

.quota-badge-cert {
    background-color: #f3e5f5;
    color: #6a1b9a;
}

.quota-badge i {
    margin-right: 0.375rem;
    font-size: 0.75rem;
}

/* Warning Box */
.warning-box {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
}

.warning-box p {
    margin: 0;
    color: #856404;
    font-size: 0.875rem;
}

.warning-box i {
    color: #ffc107;
    margin-right: 0.5rem;
}

/* Modal Footer */
.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
    border-radius: 0 0 0.75rem 0.75rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.modal-footer button {
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    border: none;
}

.modal-footer button i {
    margin-right: 0.5rem;
}

.btn-cancel {
    background-color: #ffffff;
    border: 1px solid #dee2e6 !important;
    color: #495057;
}

.btn-cancel:hover {
    background-color: #e9ecef;
    border-color: #adb5bd !important;
}

.btn-proceed {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.btn-proceed:hover:not(:disabled) {
    background: linear-gradient(135deg, #5568d3 0%, #63398a 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.btn-proceed:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quota Allocation Display Section */
.quota-display-section {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.quota-display-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
}

.quota-display-section h2 i {
    color: #667eea;
    margin-right: 0.5rem;
}

.quota-display-section > p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.quota-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quota-stat-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #ede7f6 100%);
    border: 1px solid #bbdefb;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.quota-stat-card .quota-stat-name {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.quota-stat-card .quota-stat-seats {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.quota-stat-card .quota-stat-percentage {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.quota-stat-card .quota-stat-meta {
    font-size: 0.75rem;
    color: #868e96;
    margin-top: 0.75rem;
}

.quota-note {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #856404;
}

.quota-note i {
    margin-right: 0.375rem;
}

.quota-note strong {
    font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .quota-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quota-modal-header {
        padding: 1rem;
    }
    
    .quota-modal-header .modal-title {
        font-size: 1.1rem;
    }
}
