/* CONDERI — 홍보 팝업(promotions) 전용 스타일 (2026-11-21)
   cms.js 가 만드는 <dialog class="cms-popup"> 구조를 v18 톤(화이트 · 딥네이비 · 글래스)으로 그린다.
   v16/v17 홈은 styles.css 를 싣지 않아 팝업 스타일이 없었고, cms.js 자체도 홈에서 빠져 있었다.
   이 파일은 cms.js 의 마크업에만 붙는 독립 스타일이라 다른 페이지의 디자인과 충돌하지 않는다. */

.cms-popup {
  --p-ink: #10151c;
  --p-muted: #5b6675;
  --p-navy: #0f2749;
  --p-line: #e2e7ee;
  --p-soft: #f4f7fb;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  width: min(540px, calc(100% - 40px));
  max-height: min(86dvh, 780px);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(16, 42, 86, .12);
  border-radius: 26px;
  background: #fff;
  color: var(--p-ink);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(18px) scale(.97);
  box-shadow: 0 50px 120px -40px rgba(8, 26, 51, .6), inset 0 1px 0 rgba(255, 255, 255, .9);
  font-family: "Pretendard Variable", "Paperlogy", system-ui, -apple-system, sans-serif;
}
.cms-popup:not([open]) { display: none; }
.cms-popup[open] { opacity: 1; animation: promoIn .55s cubic-bezier(.16, 1, .3, 1) forwards; }
/* 접근성(모션 감소) 환경에서는 styles.css 의 전역 animation:none!important 때문에
   열린 팝업이 opacity:0 으로 남아 화면을 가리는 문제가 있었다. 열림 상태는 항상 보이게 고정한다. */
@media (prefers-reduced-motion: reduce) {
  .cms-popup[open] { animation: none !important; opacity: 1 !important; transform: none !important; }
  .cms-popup[open] .cms-popup-scroll, .cms-popup[open] .cms-popup-foot { animation: none !important; }
}
.cms-popup:focus { outline: 0; }
.cms-popup::backdrop {
  background: rgba(6, 16, 32, .52);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
}
@keyframes promoIn { to { opacity: 1; transform: none; } }

.cms-popup-scroll { overflow: auto; overscroll-behavior: contain; padding: 20px 26px 6px; scrollbar-width: thin; }
.cms-popup-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cms-popup-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cms-popup-k { margin: 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; color: var(--p-muted); }
.cms-popup-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 46px; height: 24px; padding: 0 9px; border-radius: 999px;
  background: rgba(16, 42, 86, .07); color: var(--p-navy);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; font-variant-numeric: tabular-nums;
}
.cms-popup-nav { display: flex; align-items: center; gap: 2px; flex: none; }
.cms-popup-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 0; padding: 0; border-radius: 50%;
  background: transparent; color: var(--p-ink); cursor: pointer;
  transition: background-color .22s linear, color .22s linear;
}
.cms-popup-x:hover { background: var(--p-soft); color: var(--p-navy); }
.cms-popup-arrow { color: #8792a1; }
.cms-popup h2 {
  margin: 0 0 14px; font-family: "Paperlogy", "Pretendard Variable", sans-serif; font-weight: 600;
  font-size: clamp(19px, 2.1vw, 23px); line-height: 1.34; letter-spacing: -.03em; color: var(--p-navy);
  overflow-wrap: anywhere;
}
.cms-popup-scroll > img {
  display: block; width: 100%; max-height: 300px; object-fit: cover;
  margin: 0 0 16px; border-radius: 16px; background: var(--p-soft);
}
.cms-popup-sum { margin: 0 0 12px; font-size: 14.5px; line-height: 1.68; color: #485363; }
.cms-popup-body { font-size: 13.5px; line-height: 1.72; color: #485363; overflow-wrap: anywhere; }
.cms-popup-body p, .cms-popup-body li { color: #485363; margin: 0 0 .7em; }
.cms-popup-body h2, .cms-popup-body h3 { font-size: 15px; margin: 1em 0 .4em; color: var(--p-navy); }
.cms-popup-body ul, .cms-popup-body ol { padding-left: 1.2em; margin: 0 0 .8em; }
.cms-popup-body img { max-width: 100%; height: auto; border-radius: 12px; }

.cms-popup-foot {
  flex-shrink: 0; padding: 14px 26px 20px; border-top: 1px solid var(--p-line);
  background: #fff; display: flex; flex-direction: column; gap: 12px;
}
.cms-popup .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; cursor: pointer;
  transition: background-color .22s linear, color .22s linear, border-color .22s linear;
}
.cms-popup .button.primary { width: 100%; justify-content: space-between; background: var(--p-navy); color: #fff; }
.cms-popup .button.primary:hover { background: #102a56; }
.cms-popup .button.primary .ico { width: 16px; height: 16px; }
.cms-popup .button.secondary { background: transparent; color: var(--p-navy); border-color: var(--p-line); }
.cms-popup .button.secondary:hover { background: var(--p-soft); border-color: #c9d3e0; }
.cms-popup-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cms-popup .copy-button {
  border: 0; background: transparent; padding: 6px 0; min-height: 40px;
  color: var(--p-muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.cms-popup .copy-button:hover { color: var(--p-navy); }
.cms-popup.is-next .cms-popup-scroll, .cms-popup.is-next .cms-popup-foot { animation: promoSwap .32s cubic-bezier(.16, 1, .3, 1); }

/* 구 페이지의 .copy-button(클립보드 복사 버튼) 스타일이 팝업 안 버튼까지 물들이지 않게 고정한다. */
.cms-popup .cms-popup-actions .copy-button,
.cms-popup .copy-button.dismiss-day {
  border: 0 !important;
  background: transparent !important;
  color: #5b6675 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 6px 2px !important;
  min-height: 40px;
}
.cms-popup .cms-popup-actions .copy-button:hover,
.cms-popup .copy-button.dismiss-day:hover { color: #0f2749 !important; }

@keyframes promoSwap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .cms-popup {
    width: 100%; max-width: none; max-height: 88dvh; margin: auto 0 0;
    border-radius: 24px 24px 0 0; border-bottom: 0;
    transform: translateY(48px) scale(1);
  }
  .cms-popup-scroll { padding: 12px 20px 4px; }
  .cms-popup-scroll::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: #d5dbe4; margin: 0 auto 12px; }
  .cms-popup-foot { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); }
  .cms-popup-actions { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .cms-popup .button.secondary { width: 100%; }
  .cms-popup .copy-button { min-height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .cms-popup { opacity: 1; transform: none; }
  .cms-popup[open], .cms-popup.is-next .cms-popup-scroll, .cms-popup.is-next .cms-popup-foot { animation: none; }
}

/* 팝업이 열린 동안 배경은 inert 처리되지만, 혹시 남는 잔여 레이어가 클릭을 먹지 않도록 안전장치 */
body.has-modal { overflow: hidden; }

/* 사이트 상단 공지 배너(cms.js mountBanner) — v17/v18 마케팅 페이지에는 styles.css 가 없어
   배너가 스타일 없이 본문 끝에 붙던 문제를 막는다. 화면 하단 고정 글래스 바로 띄운다. */
.cms-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 118;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px 12px 20px;
  border-radius: 999px;
  background: #ffffff !important;
  border: 1px solid rgba(16, 42, 86, .14) !important;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 22px 50px -30px rgba(8, 26, 51, .55);
  color: #0f2749 !important;
  font-size: 13px;
  letter-spacing: -.01em;
}
.cms-banner[hidden] { display: none; }
.cms-banner a { color: #0f2749 !important; text-decoration: none; overflow-wrap: anywhere; font-weight: 500; }
.cms-banner a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cms-banner button {
  flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: rgba(16, 42, 86, .06) !important; color: #0f2749 !important; cursor: pointer; font-size: 12px; line-height: 1;
}
.cms-banner button:hover { background: rgba(16, 42, 86, .12) !important; }
@media (max-width: 560px) {
  .cms-banner { bottom: 10px; border-radius: 16px; font-size: 12.5px; padding: 11px 12px 11px 16px; }
}
/* 하단 고정 공지 배너가 페이지 마지막 콘텐츠(푸터)를 가리지 않도록 자리를 비워 둔다 (2026-11-21) */
body.has-banner { padding-bottom: var(--bh, 0px); }
