/* =========================================================
    서브페이지 팝업창 (공통)
========================================================= */

body.is-modal-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.sub-modal {
    --sub-modal-accent: var(--sub-cyan);
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

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

.sub-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 6, 10, 0.72);
    backdrop-filter: blur(7px);
}

.sub-modal__dialog {
    position: relative;
    z-index: 2;
    max-height: min(760px, calc(100vh - 80px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    background:
        radial-gradient(
            circle at 74% 75%,
            rgba(30, 79, 161, 0.13),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #242832 0%,
            #171b23 100%
        );
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
}

.sub-modal__accent {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 5;
    height: 2px;
    background: var(--sub-modal-accent);
}

.sub-modal__close {
    position: absolute;
    top: 28px;
    right: 30px;
    z-index: 8;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: none;
    cursor: pointer;
    transition:
        border-color 0.25s ease,
        background-color 0.25s ease,
        transform 0.25s ease;
}

.sub-modal__close:hover {
    border-color: var(--sub-modal-accent);
    background: var(--sub-modal-accent);
    transform: rotate(90deg);
}

.sub-modal__close span {
    position: absolute;
    top: 20px;
    left: 10px;
    width: 20px;
    height: 1px;
    background: #ffffff;
}

.sub-modal__close:hover span {
    background: #111111;
}

.sub-modal__close span:first-child {
    transform: rotate(45deg);
}

.sub-modal__close span:last-child {
    transform: rotate(-45deg);
}


/* =========================================================
    RESPONSIVE (공통)
========================================================= */

@media (max-width: 767px) {
    .sub-modal {
        align-items: flex-end;
        padding: 12px;
    }

    .sub-modal__dialog {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 22px 22px 0 0;
    }

    .sub-modal__inner {
        flex: 1 1 auto;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .sub-modal__close {
        top: 18px;
        right: 18px;
    }
}
