/* React-based Modal Styles */
#modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#modal-container.active {
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
    z-index: 10000;
}

#modal-container.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 1rem 1rem 0 0;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2544E3;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(108, 117, 125, 0.1);
    color: #495057;
}

.modal-body {
    padding: 1.5rem 2rem;
    color: #495057;
    line-height: 1.6;
}

.modal-footer {
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-radius: 0 0 1rem 1rem;
}

/* Modal Sizes */
.modal-sm { max-width: 300px; }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1140px; }

/* Modal Types */
.modal-info .modal-header { background: rgba(13, 202, 240, 0.1); border-bottom-color: rgba(13, 202, 240, 0.3); }
.modal-success .modal-header { background: rgba(25, 135, 84, 0.1); border-bottom-color: rgba(25, 135, 84, 0.3); }
.modal-warning .modal-header { background: rgba(255, 193, 7, 0.1); border-bottom-color: rgba(255, 193, 7, 0.3); }
.modal-error .modal-header,
.modal-danger .modal-header { background: rgba(220, 53, 69, 0.1); border-bottom-color: rgba(220, 53, 69, 0.3); }

.modal-info .modal-title { color: #0dcaf0; }
.modal-success .modal-title { color: #198754; }
.modal-warning .modal-title { color: #ffc107; }
.modal-error .modal-title,
.modal-danger .modal-title { color: #dc3545; }

/* Button Styles */
.modal-footer .btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.2s ease;
}

.modal-footer .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 576px) {
    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem 1.5rem;
    }

    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* Loading State */
.modal-loading .modal-body::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(37, 68, 227, 0.3);
    border-radius: 50%;
    border-top-color: #2544E3;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}