/**
 * PC 앱 설치 QR 모달 — wh_app_download_qr.php (머리글 「앱 받기」 링크·앱 설치 카드 공용).
 * app_download_fab.css에서 떼어 냄(2026-10-09 #617): 카드를 빼는 숙소 상세·검색에서도 모달만 쓰므로
 * 카드·AI 버튼 위치 규칙이 그 화면에 따라 들어가지 않게 했다. 토큰: wh-tokens.css
 */
html:not([class*="force-desktop-ui"]) .wh-appdl-qr {
  display: none !important;
}

html.wh-appdl-qr-open {
  overflow: hidden;
}

html.wh-appdl-qr-open .wh-appdl.is-on {
  animation: none;
}

.wh-appdl-qr[hidden] {
  display: none !important;
}

.wh-appdl-qr {
  position: fixed;
  inset: 0;
  z-index: 20000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--wh-space-xl, 24px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--wh-motion-slow, 380ms) var(--wh-ease-out-smooth, cubic-bezier(0.16, 1, 0.3, 1)),
    visibility 0s linear var(--wh-motion-slow, 380ms);
}

.wh-appdl-qr.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity var(--wh-motion-slow, 380ms) var(--wh-ease-out-smooth, cubic-bezier(0.16, 1, 0.3, 1)),
    visibility 0s linear 0s;
}

.wh-appdl-qr__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(0 0 0 / 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.wh-appdl-qr__dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 400px);
  margin: 0;
  padding: var(--wh-inset-xl, 32px) var(--wh-inset-lg, 24px) var(--wh-space-2xl, 28px);
  border-radius: var(--wh-radius-md, 20px);
  background: var(--wh-card, #fff);
  box-shadow: var(--wh-shadow-listing, 0 0 0 1px rgba(0, 0, 0, 0.02), 0 2px 6px rgba(0, 0, 0, 0.04), 0 4px 8px rgba(0, 0, 0, 0.1));
  text-align: center;
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  transition:
    transform var(--wh-motion-sheet, 480ms) var(--wh-ease-spring, cubic-bezier(0.34, 1.28, 0.64, 1)),
    opacity var(--wh-motion-slow, 380ms) var(--wh-ease-out-smooth, cubic-bezier(0.16, 1, 0.3, 1));
}

.wh-appdl-qr.is-on .wh-appdl-qr__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
  transition-delay: 40ms;
}

.wh-appdl-qr__close {
  position: absolute;
  top: var(--wh-space-xs, 8px);
  right: var(--wh-space-xs, 8px);
  width: var(--wh-touch-min, 44px);
  height: var(--wh-touch-min, 44px);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--wh-radius-sharp, 10px);
  background: transparent;
  color: var(--wh-tx, #1A1A1A);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wh-appdl-qr__close:focus-visible {
  outline: 2px solid var(--wh-focus-ring, #681dc7);
  outline-offset: 2px;
}

.wh-appdl-qr__title {
  margin: 0 0 var(--wh-space-sm, 12px);
  padding: 0 var(--wh-space-2xl, 28px);
  font-family: var(--wh-ff-display, SUIT, sans-serif);
  font-size: var(--wh-text-section, 1.375rem);
  font-weight: 800;
  line-height: var(--wh-lh-tight, 1.14);
  letter-spacing: var(--wh-tracking-title, -0.03em);
  color: var(--wh-tx, #1A1A1A);
}

.wh-appdl-qr__lead {
  margin: 0 0 var(--wh-space-sm, 12px);
  font-family: var(--wh-ff, Pretendard, sans-serif);
  font-size: var(--wh-text-base, 1rem);
  font-weight: 500;
  line-height: var(--wh-lh-body, 1.5);
  letter-spacing: var(--wh-tracking-body, -0.02em);
  color: var(--wh-tx2, #4A4A4A);
}

.wh-appdl-qr__perk {
  margin: 0 0 var(--wh-space-xs, 8px);
  font-family: var(--wh-ff, Pretendard, sans-serif);
  font-size: var(--wh-text-base, 1rem);
  font-weight: 700;
  line-height: var(--wh-lh-body, 1.5);
  letter-spacing: var(--wh-tracking-body, -0.02em);
  color: var(--wh-tx, #1A1A1A);
}

.wh-appdl-qr__once {
  margin: 0 0 var(--wh-space-xl, 24px);
  font-family: var(--wh-ff, Pretendard, sans-serif);
  font-size: var(--wh-text-sm, 0.875rem);
  font-weight: 500;
  line-height: var(--wh-lh-body, 1.5);
  letter-spacing: var(--wh-tracking-body, -0.02em);
  color: var(--wh-tx3, #6B6B6B);
}

.wh-appdl-qr__plate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 252px;
  max-width: 100%;
  margin: 0 auto;
  padding: var(--wh-space-md, 16px);
  border-radius: var(--wh-radius-xs, 12px);
  background: var(--wh-card, #fff);
  border: 1px solid var(--wh-bd-hairline, #E5E5E5);
}

.wh-appdl-qr__img {
  display: block;
  width: 220px;
  max-width: 100%;
  aspect-ratio: 1;
  image-rendering: pixelated;
}

.wh-appdl-qr__url {
  margin: var(--wh-space-md, 16px) 0 0;
  font-family: var(--wh-ff, Pretendard, sans-serif);
  font-size: var(--wh-text-sm, 0.875rem);
  font-weight: 500;
  line-height: var(--wh-lh-body, 1.5);
  color: var(--wh-tx3, #6B6B6B);
}

@media (prefers-reduced-motion: reduce) {
  .wh-appdl-qr,
  .wh-appdl-qr.is-on,
  .wh-appdl-qr__dialog,
  .wh-appdl-qr.is-on .wh-appdl-qr__dialog {
    transition: none;
  }
  .wh-appdl-qr__dialog,
  .wh-appdl-qr.is-on .wh-appdl-qr__dialog {
    transform: none;
  }
}

html.wh-reduce-motion .wh-appdl-qr,
html.wh-reduce-motion .wh-appdl-qr.is-on,
html.wh-reduce-motion .wh-appdl-qr__dialog,
html.wh-reduce-motion .wh-appdl-qr.is-on .wh-appdl-qr__dialog {
  transition: none;
}
html.wh-reduce-motion .wh-appdl-qr__dialog,
html.wh-reduce-motion .wh-appdl-qr.is-on .wh-appdl-qr__dialog {
  transform: none;
}
