/* ============================================================
   layer-popup — Figma C0004 (78:1605 PC 540×680 · 78:1661 MO 360×535)
   C0005 / C0006
   ============================================================ */

.layer-popup {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 400);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color-scheme: light;
}

.layer-popup[hidden] {
  display: none;
}

.layer-popup.is-open {
  display: flex;
}

.layer-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.layer-popup__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 400px;
  max-width: 100%;
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(13, 17, 32, 0.24);
}

.layer-popup--promo .layer-popup__dialog {
  width: 540px;
}

.layer-popup--notice .layer-popup__dialog {
  width: 540px;
}

/* ---------- C0004 프로모션 본문 ---------- */
.layer-popup__viewport {
  position: relative;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

.layer-popup__track {
  display: flex;
  width: 100%;
  height: 100%;
}

.layer-popup__slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  display: none;
}

.layer-popup__slide.is-active {
  display: block;
}

.promo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  min-height: 480px;
  padding: 28px 20px 20px;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 215, 0, 0.28) 0%, transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.16) 0%, transparent 36%),
    radial-gradient(circle at 70% 78%, rgba(255, 180, 60, 0.12) 0%, transparent 40%),
    linear-gradient(180deg, #6b1018 0%, #3a070c 55%, #2a0508 100%);
  text-align: center;
}

.promo-card--image {
  display: block;
  min-height: 0;
  padding: 0;
  background: transparent;
}

.promo-card--image picture {
  display: block;
}

.promo-card__eyebrow {
  margin: 0;
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #fff;
}

.promo-card__title {
  margin: 8px 0 0;
  font-size: 22px;
  line-height: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffd54a;
}

.promo-card__hero {
  width: 100%;
  height: 140px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 8px;
}

.promo-card__hero-img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.promo-card__products {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
}

.promo-card__product {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 96px;
  padding: 8px;
  background: #fff;
  border-radius: 8px;
}

.promo-card__product-img {
  display: block;
  width: 140px;
  max-width: 100%;
  height: 88px;
  object-fit: contain;
}

.promo-card__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  margin-top: 20px;
  border: 0;
  border-radius: 40px;
  background: #000;
  color: #fff;
  font-size: 15px;
  line-height: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.promo-card__cta:focus-visible {
  outline: 2px solid #ea002c;
  outline-offset: 2px;
}

.promo-card__full {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

/* ---------- C0005 / C0006 공지 본문 ---------- */
.layer-popup--notice .layer-popup__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 40px 32px;
  text-align: center;
}

.layer-popup__title {
  margin: 0;
  font-size: 24px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #EA002C;
  text-align: center;
  word-break: keep-all;
}

.layer-popup__logo {
  display: block;
  width: 110px;
  height: 75px;
  margin: 20px 0 0;
  object-fit: contain;
}

.layer-popup__text {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #000;
  text-align: center;
  word-break: keep-all;
}

.layer-popup__highlight + .layer-popup__text {
  margin-top: 20px;
}

.layer-popup__highlight {
  box-sizing: border-box;
  width: 100%;
  margin-top: 24px;
  padding: 16px 20px;
  background: #fff0f0;
  text-align: center;
  border-radius: 12px;
}

.layer-popup__highlight-label {
  display: block;
  font-size: 20px;
  line-height: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #000;
}

.layer-popup__highlight-value {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #000;
}

.layer-popup__highlight-value .red {
  color: #EA002C;
}

/* ---------- 공통 하단 바 ---------- */
.layer-popup__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 64px;
  padding: 0 20px;
  background: #fff;
  border-top: 1px solid #ddd;
}

.layer-popup__pager {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.layer-popup__pager-status {
  min-width: 40px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #000;
  text-align: center;
  white-space: nowrap;
}

.layer-popup__pager-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.layer-popup__pager-btn:disabled {
  cursor: default;
}

.layer-popup__pager-btn:focus-visible {
  outline: 2px solid #ea002c;
  outline-offset: 2px;
}

.layer-popup__pager-arrow {
  display: block;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid #ccc;
  border-right: 1.5px solid #ccc;
}

.layer-popup__pager.is-enabled .layer-popup__pager-arrow {
  border-top-color: #000;
  border-right-color: #000;
}

.layer-popup__pager-arrow--prev {
  transform: rotate(-135deg);
}

.layer-popup__pager-arrow--next {
  transform: rotate(45deg);
}

.layer-popup__bar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.layer-popup__today {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.layer-popup__today-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.layer-popup__today-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background: url("/resources/renewal/assets/icons/ic24_check_off.svg") center / 24px 24px no-repeat;
}

.layer-popup__today-input:checked + .layer-popup__today-icon {
  background-image: url("/resources/renewal/assets/icons/ic24_check_on.svg");
}

.layer-popup__today-input:focus-visible + .layer-popup__today-icon {
  outline: 2px solid #ea002c;
  outline-offset: 2px;
  border-radius: 50%;
}

.layer-popup__today-label {
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #000;
  white-space: nowrap;
}

.layer-popup__close-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #000;
  cursor: pointer;
}

.layer-popup__close-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.layer-popup__close-btn:focus-visible {
  outline: 2px solid #ea002c;
  outline-offset: 2px;
}

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

/* 팝업 스크롤바 — 국가별 요금 안내와 동일 */
[class*="-popup__body"],
[class*="-popup__scroll"] {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.28) transparent;
}

[class*="-popup__body"]::-webkit-scrollbar,
[class*="-popup__scroll"]::-webkit-scrollbar {
  width: 8px;
}

[class*="-popup__body"]::-webkit-scrollbar-track,
[class*="-popup__scroll"]::-webkit-scrollbar-track {
  background: transparent;
}

[class*="-popup__body"]::-webkit-scrollbar-thumb,
[class*="-popup__scroll"]::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.28);
  border-radius: 8px;
}

[class*="-popup__body"]::-webkit-scrollbar-button,
[class*="-popup__scroll"]::-webkit-scrollbar-button,
[class*="-popup__body"]::-webkit-scrollbar-button:single-button,
[class*="-popup__scroll"]::-webkit-scrollbar-button:single-button,
[class*="-popup__body"]::-webkit-scrollbar-button:vertical:start:decrement,
[class*="-popup__scroll"]::-webkit-scrollbar-button:vertical:start:decrement,
[class*="-popup__body"]::-webkit-scrollbar-button:vertical:end:increment,
[class*="-popup__scroll"]::-webkit-scrollbar-button:vertical:end:increment {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

/* ---------- Mobile (Figma 78:1661 · 360×535) ---------- */
@media (max-width: 1279.98px) {
  .promo-card {
    min-height: 0;
  }

  .promo-card__title {
    font-size: 20px;
    line-height: 28px;
  }

  .promo-card__hero,
  .promo-card__hero-img {
    height: 120px;
  }

  .promo-card__product {
    height: 84px;
  }

  .promo-card__product-img {
    width: 120px;
    height: 72px;
  }

  .promo-card__full {
    width: 100%;
  }

  .layer-popup--sheet {
    align-items: flex-end;
    padding: 0;
  }

  .layer-popup--sheet .layer-popup__dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 40px);
    border-radius: 20px 20px 0 0;
  }

  .layer-popup--notice .layer-popup__body {
    padding: 32px 20px 24px;
  }

  .layer-popup__title {
    font-size: 22px;
    line-height: 32px;
  }

  .layer-popup__logo {
    width: 88px;
    height: 60px;
    margin-top: 16px;
  }

  .layer-popup__highlight-label {
    font-size: 18px;
    line-height: 26px;
  }
  
  .layer-popup__text,
  .layer-popup__highlight-value {
    font-size: 14px;
    line-height: 22px;
  }

  .layer-popup__highlight {
    margin-top: 20px;
    padding: 14px 16px;
  }

  .layer-popup--sheet .layer-popup__bar {
    min-height: 57px;
    padding: 0 20px calc(env(safe-area-inset-bottom, 0px));
  }

  .layer-popup__pager-status {
    min-width: 32px;
    font-size: 14px;
    line-height: 22px;
  }

  .layer-popup__pager-btn {
    width: 16px;
    height: 16px;
  }

  .layer-popup__today {
    gap: 10px;
  }

  .layer-popup__today-icon {
    width: 20px;
    height: 20px;
    background-size: 20px 20px;
  }

  .layer-popup__today-label,
  .layer-popup__close-btn {
    font-size: 14px;
    line-height: 22px;
  }

  .layer-popup__close-icon {
    width: 16px;
    height: 16px;
  }

  .layer-popup__bar-actions {
    gap: 20px;
  }
  .layer-popup__close-btn svg{
    width: 16px;
    height: 16px;
  }
}
