/* ----------------------------------------------------------------------------------------
 * modals.css — shared modal/dialog styling.
 *
 * Extracted from wwwroot/css/fitter-schedule.css on 2026-05-10 because the same six
 * `.modal-overlay > .modal-content > .modal-header / .modal-body / .modal-footer`
 * structure appears across multiple pages but the CSS only existed in fitter-schedule.css.
 * Pages that use the shared modal markup pattern (custom HTML overlays, NOT MudBlazor's
 * MudDialog/MudOverlay) pick up these classes automatically since this file is loaded
 * site-wide via Pages/_Host.cshtml.
 *
 * MudBlazor dialogs (MudOverlay/MudDialog) use their own internal styling and are NOT
 * affected by these rules.
 * ---------------------------------------------------------------------------------------- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.modal-body {
    padding: 24px;
}

/* Single canonical modal footer. The previous fitter-schedule.css had two competing
 * `.modal-footer` rule blocks at lines 3020 and 3546 with slightly different paddings
 * and flex behaviour — the second one (with explicit display:flex) won by source order.
 * That layout is preserved here. */
.modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    border-radius: 0 0 12px 12px;
}

.modal-footer .btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.modal-footer .btn-secondary {
    background: #6c757d;
    color: white;
}

.modal-footer .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Slide-in animation referenced by .modal-content. Matches the legacy values from
 * fitter-schedule.css so the migration is visually identical. */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
