﻿@charset "UTF-8";

/* =========================================================
   notice_popup.css
   공지사항 팝업 (메인 + 몰 공용)
   접두사: dp-popup- (Dorandoran Popup)

   ── 구조 ──
   .dp-popup-overlay          오버레이
     └ .dp-popup-container     팝업 본체
         ├ .dp-popup-close     닫기 (X) 버튼
         ├ .dp-popup-header    텍스트 모드 헤더
         ├ .dp-popup-img-wrap  이미지 모드 래퍼
         ├ .dp-popup-body      텍스트 모드 본문
         ├ .dp-popup-link-btn  이미지 위 링크 버튼
         └ .dp-popup-footer    하단 (체크박스 + 닫기)
   ========================================================= */


/* ─────────────────────────────────────────────
   0. Keyframes
   ───────────────────────────────────────────── */
@keyframes dpPopupOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes dpPopupOverlayOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes dpPopupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
@keyframes dpPopupSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(12px);
    }
}
@keyframes dpPopupShimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes dpPopupPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}


/* ─────────────────────────────────────────────
   1. Overlay
   ───────────────────────────────────────────── */
.dp-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: transparent;
    /* backdrop-filter: none; */
    -webkit-/* backdrop-filter: none; */
    overflow-y: auto;
    padding: 2rem 1rem;
    -webkit-overflow-scrolling: touch;
}

.dp-popup-overlay.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: dpPopupOverlayIn 0.3s ease forwards;
}

.dp-popup-overlay.is-closing {
    animation: dpPopupOverlayOut 0.25s ease forwards;
    pointer-events: none;
}


/* ─────────────────────────────────────────────
   2. Container (공통)
   ───────────────────────────────────────────── */
.dp-popup-container {
    pointer-events: auto; /* 팝업 자체는 클릭 가능 */
    position: relative;
    z-index: 10051;
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.28),
        0 8px 32px rgba(0, 0, 0, 0.14),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    animation: dpPopupSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    box-sizing: border-box;
}

.dp-popup-overlay.is-closing .dp-popup-container {
    animation: dpPopupSlideOut 0.25s ease forwards;
}


/* ─────────────────────────────────────────────
   3. Close Button (공통)
   ───────────────────────────────────────────── */
.dp-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.dp-popup-close:hover {
    background: rgba(255, 255, 255, 0.40);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.dp-popup-close:active {
    transform: rotate(90deg) scale(0.95);
}


/* =========================================================
   A. IMAGE MODE  —  .dp-popup-container.is-image
   ========================================================= */
.dp-popup-container.is-image {
    background: #000;
}

/* ── 이미지 래퍼 ── */
.dp-popup-image-wrap {
    position: relative;
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

.dp-popup-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 75vh;
    border-radius: 0;
}

/* ── 이미지 위 링크 버튼 ── */
.dp-popup-link-btn {
    position: absolute;
    bottom: 60px;              /* footer 위 여유 */
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.18),
        inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    white-space: nowrap;
}

.dp-popup-link-btn:hover {
    background: rgba(255, 255, 255, 0.38);
    transform: translateX(-50%) translateY(-2px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.22),
        inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    color: #fff;
    text-decoration: none;
}

.dp-popup-link-btn:active {
    transform: translateX(-50%) translateY(0);
}

.dp-popup-link-btn i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.dp-popup-link-btn:hover i {
    transform: translateX(3px);
}

/* ── 이미지 모드 Footer (반투명 다크 바) ── */
.dp-popup-container.is-image .dp-popup-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.45) 60%,
        transparent 100%
    );
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 0 0 16px 16px;
    z-index: 5;
}


/* =========================================================
   B. TEXT MODE  —  .dp-popup-container.is-text
   ========================================================= */
.dp-popup-container.is-text {
    background: #ffffff;
}

/* ── 헤더 (흰색 배경) ── */
.dp-popup-header {
    position: relative;
    padding: 22px 24px 16px;
    background: #ffffff;
    color: #212529;
    border-bottom: 1px solid #eee;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dp-popup-header i {
    color: #667eea;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.dp-popup-header span {
    font-weight: 700;
    font-size: 1.05rem;
    color: #212529;
    line-height: 1.3;
}

/* 헤더 장식 패턴 (흠색 모드에서는 비활성) */
.dp-popup-header::before {
    content: '';
    display: none;
}

.dp-popup-header::after {
    content: '';
    display: none;
}

.dp-popup-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 1.3rem;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.dp-popup-header-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.dp-popup-header-sub {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.7;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* 텍스트 모드 닫기 버튼 색상 보정 (흠색 헤더) */
.dp-popup-container.is-text .dp-popup-close {
    background: rgba(0, 0, 0, 0.06);
    color: #888;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: none;
}

.dp-popup-container.is-text .dp-popup-close:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #333;
}

/* ── 본문 ── */
.dp-popup-body {
    padding: 22px 24px;
    color: #333;
    font-size: 0.92rem;
    line-height: 1.7;
    max-height: 45vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d0d0d0 transparent;
    word-break: break-word;
    overflow-wrap: anywhere;
    /* ★ pre-line 제거 — CKEditor HTML 콘텐츠의 표/이미지를 깨뜨림 */
    white-space: normal;
    /* 표가 넓을 때 팝업 전체가 밀리지 않도록 */
    overflow-x: hidden;
}

.dp-popup-body::-webkit-scrollbar {
    width: 4px;
}

.dp-popup-body::-webkit-scrollbar-track {
    background: transparent;
}

.dp-popup-body::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 4px;
}

.dp-popup-body::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* CKEditor 본문이 들어올 경우 */
.dp-popup-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}

/* ── 팝업 내 CKEditor 표(Table) — qna_view_modal과 100% 동일 ── */
/* figure.table이 스크롤 컨테이너 역할 */
.dp-popup-body figure.table {
    display: block !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
    margin: 0.8em 0 !important;
    padding: 0 !important;
}

/* 스크롤바 시각적으로 숨김 (터치/마우스 드래그로 스크롤) */
.dp-popup-body figure.table::-webkit-scrollbar {
    display: none !important;
}

/* 표: 내용이 넓으면 컨테이너를 넘어가도록 허용 (압축 금지) */
.dp-popup-body figure.table > table,
.dp-popup-body > table {
    min-width: max-content !important;
    max-width: none !important;
    table-layout: auto;
    border-collapse: collapse;
    border: 1px double #b3b3b3;
}

/* 셀: 테두리 + 내용 줄바꿈 방지 */
.dp-popup-body figure.table table td,
.dp-popup-body figure.table table th,
.dp-popup-body > table td,
.dp-popup-body > table th {
    padding: 0.4em 0.8em;
    border: 1px solid #bfbfbf;
    word-break: keep-all !important;
    white-space: nowrap !important;
}

/* ── 텍스트 모드 Footer ── */
.dp-popup-container.is-text .dp-popup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #fafafa;
    border-radius: 0 0 16px 16px;
}


/* ─────────────────────────────────────────────
   4. Footer (공통 스타일)
   ───────────────────────────────────────────── */

/* "오늘 하루 열지않음" 텍스트 (체크박스 없음) */
.dp-popup-noshow-text {
    font-size: 0.88rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: color 0.2s ease;
    line-height: 1;
}

.dp-popup-noshow-text:hover {
    color: #222;
}

/* 닫기 텍스트 버튼 */
.dp-popup-close-text {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1;
    white-space: nowrap;
}

/* 텍스트 모드 닫기 텍스트 */
.dp-popup-container.is-text .dp-popup-close-text {
    color: #888;
}

.dp-popup-container.is-text .dp-popup-close-text:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.04);
}


/* ─────────────────────────────────────────────
   5. Multiple Popup Stacking
      여러 팝업이 나란히 표시될 때
   ───────────────────────────────────────────── */
.dp-popup-overlay + .dp-popup-overlay {
    background: rgba(0, 0, 0, 0.30);
}


/* ─────────────────────────────────────────────
   6. Responsive
   ───────────────────────────────────────────── */

/* ── 모바일 (≤576px) ── */
@media (max-width: 576px) {
    .dp-popup-overlay {
        padding: 1rem 0.75rem;
        align-items: center;
    }

    .dp-popup-container {
        max-width: 90vw;
        border-radius: 14px;
    }

    .dp-popup-image-wrap img {
        max-height: 70vh;
    }

    .dp-popup-close {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        top: 10px;
        right: 10px;
    }

    .dp-popup-header {
        padding: 22px 18px 18px;
    }

    .dp-popup-header-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        border-radius: 10px;
        margin-bottom: 10px;
    }

    .dp-popup-header-title {
        font-size: 1.08rem;
    }

    .dp-popup-header-sub {
        font-size: 0.75rem;
    }

    .dp-popup-body {
        padding: 18px 18px;
        font-size: 0.88rem;
        max-height: 40vh;
    }

    .dp-popup-container.is-text .dp-popup-footer,
    .dp-popup-container.is-image .dp-popup-footer {
        padding: 10px 14px;
    }

    .dp-popup-noshow-text {
        font-size: 0.82rem;
    }

    .dp-popup-close-text {
        font-size: 0.82rem;
    }

    .dp-popup-link-btn {
        bottom: 52px;
        padding: 8px 22px;
        font-size: 0.82rem;
    }

    /* 이미지 모드 footer 그라디언트 높이 보정 */
    .dp-popup-container.is-image .dp-popup-footer {
        padding: 10px 14px;
    }
}

/* ── 초소형 기기 (≤380px) ── */
@media (max-width: 380px) {
    .dp-popup-overlay {
        padding: 0.75rem 0.5rem;
    }

    .dp-popup-container {
        max-width: 95vw;
        border-radius: 12px;
    }

    .dp-popup-close {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
        top: 8px;
        right: 8px;
    }

    .dp-popup-header {
        padding: 18px 14px 16px;
    }

    .dp-popup-header-title {
        font-size: 1rem;
    }

    .dp-popup-body {
        padding: 14px 14px;
        font-size: 0.84rem;
    }

    .dp-popup-noshow-text {
        font-size: 0.78rem;
    }

    .dp-popup-link-btn {
        bottom: 46px;
        padding: 7px 18px;
        font-size: 0.78rem;
    }
}


/* ─────────────────────────────────────────────
   7. Accessibility & UX
   ───────────────────────────────────────────── */

/* 감소된 모션 선호 시 애니메이션 비활성화 */
@media (prefers-reduced-motion: reduce) {
    .dp-popup-overlay.is-open,
    .dp-popup-overlay.is-closing,
    .dp-popup-container,
    .dp-popup-overlay.is-closing .dp-popup-container {
        animation: none !important;
    }

    .dp-popup-close:hover {
        transform: none;
    }
}

/* 포커스 가시성 */
.dp-popup-close:focus-visible,
.dp-popup-link-btn:focus-visible,
.dp-popup-close-text:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.dp-popup-noshow-text:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}


/* ─────────────────────────────────────────────
   8. Print — 팝업 숨김
   ───────────────────────────────────────────── */
@media print {
    .dp-popup-overlay {
        display: none !important;
    }
}

/* ===== 공지팝업: 배경 완전 제거 (오버레이 투명) ===== */
.dp-popup-overlay,
.dp-popup-overlay.is-open,
.dp-popup-overlay + .dp-popup-overlay {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none !important;
}
.dp-popup-container {
    pointer-events: auto !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10) !important;
}