/* ==========================================================================
   MODAL
   ========================================================================== */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.is-open {
    display: flex;
}

/* Overlay */
.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    cursor: pointer;
}

/* Container */
.modal__container {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    animation: modal-in 0.25s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.modal__title {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f345c;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #6b7280;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.modal__close:hover {
    background: #f3f4f6;
    color: #1f345c;
}

/* Body */
.modal__body {
    padding: 1.5rem 1.75rem 2rem;
}

/* Prevent body scroll when modal open */
body.modal-open {
    overflow: hidden;
}

/* Mobile */
@media (max-width: 600px) {
    .modal {
        padding: 0;
        align-items: flex-end;
    }

    .modal__container {
        border-radius: 1rem 1rem 0 0;
        max-height: 92vh;
    }

    .modal__header {
        padding: 1.25rem 1.25rem 0.75rem;
    }

    .modal__body {
        padding: 1.25rem 1.25rem 2rem;
    }
}