/* 모달 컴포넌트 — 가이드 §10.2 */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-4);
}

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

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.5);
    animation: modal-fade var(--motion-base) ease;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: calc(100% - 32px);
    max-height: calc(100vh - 32px);
    padding: var(--spacing-5);
    background: var(--primary-0);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: auto;
    animation: modal-pop var(--motion-base) ease;
}

@media (min-width: 768px) {
    .modal-content {
        max-width: 560px;
        padding: var(--spacing-7);
        border-radius: var(--radius-xl);
    }
    .modal-content.modal-lg { max-width: 720px; }
}

.modal-content.modal-sm { max-width: 400px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-3);
    margin-bottom: var(--spacing-4);
}

.modal-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--neutral-basic);
}

.modal-close {
    flex-shrink: 0;
}

.modal-body {
    color: var(--neutral-basic);
}

.modal-message {
    margin: 0 0 var(--spacing-3);
    font-size: 15px;
    line-height: 1.6;
    color: var(--neutral-subtle);
}

.modal-message:last-child {
    margin-bottom: 0;
}

.modal-footer {
    margin-top: var(--spacing-6);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-2);
}

@keyframes modal-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes modal-pop {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Video Modal — 영상 재생 전용 ───────────────────────── */
.video-modal-player {
    width: 100%;
    max-height: 70vh;
    border-radius: var(--radius-md);
    background: #000;
}
