/* AdminDash css 08: Generic modal primitives (backdrop, content, header/body/footer, close) — ported from FFLScan's modal system */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(var(--overlay-inv), 0.65);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: backdrop-in 0.25s ease backwards;
}

@keyframes backdrop-in {
    from { opacity: 0; }
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(var(--overlay), 0.1);
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 32px;
    animation: modal-pop 0.34s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes modal-pop {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(var(--overlay), 0.05);
    border: 1px solid rgba(var(--overlay), 0.08);
    color: var(--gray-400);
    font-size: 1.5rem;
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 8;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close:hover {
    background: rgba(var(--overlay), 0.12);
    color: var(--white);
    transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
    .modal-backdrop,
    .modal-content {
        animation: none;
    }
    .modal-close:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .modal-content { padding: 20px; border-radius: 12px; max-height: 90vh; }
    .modal-close { width: 40px; height: 40px; font-size: 1.25rem; }
}
