/* ==============================
   Module Popup
   ============================== */

.pn-popup-module-wrap {
    display: contents;
}

.pn-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none !important;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(9, 15, 28, 0.74);
    backdrop-filter: blur(10px);
}

.pn-popup-overlay.show {
    display: flex !important;
}

body.pn-popup-open {
    overflow: hidden;
}

.pn-popup-box {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: min(90vh, 920px);
    overflow: auto;
    border: 1px solid rgba(214, 147, 53, 0.18);
    border-radius: 28px;
    background: linear-gradient(180deg, #fffdf9 0%, #ffffff 100%);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.42);
    animation: pnPopupIn 0.35s ease both;
    scrollbar-width: thin;
    scrollbar-color: rgba(142, 47, 24, 0.28) transparent;
}

.pn-popup-box--image-only {
    max-width: 620px;
    overflow: hidden;
}

.pn-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(24, 33, 46, 0.72);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.28);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.pn-popup-close:hover,
.pn-popup-close:focus-visible {
    background: rgba(142, 47, 24, 0.95);
    box-shadow: 0 16px 30px rgba(142, 47, 24, 0.36);
    transform: translateY(-1px);
    outline: none;
}

.pn-popup-close-icon {
    display: block;
    font-size: 28px;
    line-height: 1;
    transform: translateY(-1px);
}

.pn-popup-image {
    position: relative;
    overflow: hidden;
    background: #f5f2ea;
}

.pn-popup-image--clickable {
    cursor: pointer;
}

.pn-popup-image-link {
    display: block;
    position: relative;
    color: inherit;
    text-decoration: none;
}

.pn-popup-image-link:hover img,
.pn-popup-image-link:focus-visible img {
    filter: brightness(1.02);
}

.pn-popup-image img {
    display: block;
    width: 100%;
    height: auto;
    transition: filter 0.2s ease;
}

.pn-popup-content {
    display: grid;
    gap: 16px;
    padding: 22px 26px 28px;
    border-top: 1px solid rgba(140, 98, 42, 0.08);
}

.pn-popup-content h3 {
    margin: 0;
    color: #18314d;
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 800;
    line-height: 1.2;
}

.pn-popup-text {
    color: #5f6775;
    font-size: 15px;
    line-height: 1.75;
}

.pn-popup-text-inner {
    display: block;
}

.pn-popup-text-inner p,
.pn-popup-text-inner ul,
.pn-popup-text-inner ol {
    margin: 0 0 10px;
}

.pn-popup-text-inner p:last-child,
.pn-popup-text-inner ul:last-child,
.pn-popup-text-inner ol:last-child {
    margin-bottom: 0;
}

.pn-popup-text-inner ul,
.pn-popup-text-inner ol {
    padding-left: 22px;
}

.pn-popup-text-inner a {
    color: #8e2f18;
    font-weight: 600;
    text-decoration: none;
}

.pn-popup-text-inner a:hover {
    color: #b85f1d;
}

.pn-popup-action {
    display: flex;
    justify-content: flex-start;
}

.pn-popup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #8e2f18 0%, #cf7a1b 100%);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    box-shadow: 0 14px 32px rgba(142, 47, 24, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.pn-popup-button:hover,
.pn-popup-button:focus-visible {
    color: #ffffff !important;
    filter: brightness(1.05);
    box-shadow: 0 18px 34px rgba(142, 47, 24, 0.3);
    transform: translateY(-1px);
    outline: none;
}

.pn-popup-type-banner .pn-popup-box {
    max-width: 640px;
}

.pn-popup-type-banner .pn-popup-image img {
    object-fit: contain;
}

.pn-popup-type-poster .pn-popup-box {
    max-width: 560px;
}

.pn-popup-type-poster .pn-popup-image img {
    object-fit: contain;
}

.pn-popup-type-qr .pn-popup-box {
    max-width: 460px;
}

.pn-popup-type-qr .pn-popup-image img {
    object-fit: contain;
}

@keyframes pnPopupIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

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

@media (max-width: 576px) {
    .pn-popup-overlay {
        padding: 16px;
        align-items: center;
    }

    .pn-popup-box,
    .pn-popup-type-banner .pn-popup-box,
    .pn-popup-type-poster .pn-popup-box,
    .pn-popup-type-qr .pn-popup-box {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 32px);
        border-radius: 22px;
    }

    .pn-popup-close {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
    }

    .pn-popup-close-icon {
        font-size: 26px;
    }

    .pn-popup-content {
        gap: 14px;
        padding: 18px 18px 22px;
    }

    .pn-popup-content h3 {
        font-size: 22px;
    }

    .pn-popup-text {
        font-size: 14px;
        line-height: 1.7;
    }

    .pn-popup-action {
        justify-content: stretch;
    }

    .pn-popup-button {
        width: 100%;
        min-height: 44px;
    }
}
