/* ==========================================================================
   첫 화면 팝업(알림) - 다른 병원 새 홈페이지와 같은 고정 형태
   (참고\뼈대\_source\wwwroot\css\fixed.css 의 팝업 부분. 모양은 바꾸지 않고 색만 이 병원에 맞춤)
   내용: popup_banner 표, 관리: /manage/popups.asp, 동작: /popup/popups.js
   ========================================================================== */
.popups {
  --fx-accent: #2a89e1;
  --fx-accent-deep: #1d6bb5;
  --fx-accent-ink: #fff;
  --fx-dark: #263240;
  --fx-soft: #eef6fd;
  --fx-ink: #322f31;
  --fx-radius: 24px;
  font-family: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", sans-serif;
  color: var(--fx-ink);
}
/* ── 첫 화면 팝업: 한 장씩 넘겨보기 + 썸네일 + 오늘 하루 보지 않기 ── */
.popups {
  --pp-w: 440px;
  width: var(--pp-w); max-width: calc(100vw - 32px);
  padding: 0; border: 0; overflow: hidden;
  border-radius: var(--fx-radius);
  background: var(--fx-dark);
  box-shadow: 0 30px 70px -20px rgb(0 0 0 / .6);
}
.popups::backdrop { background: rgb(0 0 0 / .5); backdrop-filter: blur(2px); }
.pp-stage { position: relative; background: #fff; }
.pp-track { display: flex; align-items: flex-start; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; outline: none; }
.pp-track::-webkit-scrollbar { display: none; }
/* 창 높이는 이미지 높이를 따른다 (여러 장이면 지금 보이는 장의 높이로, site.js) */
.pp-slide { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; background: var(--fx-soft); }
.pp-slide a { display: contents; }
.pp-slide img { display: block; width: 100%; height: auto; max-height: 76vh; object-fit: contain; }
.pp-arrow {
  position: absolute; top: 50%; translate: 0 -50%;
  display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: rgb(255 255 255 / .92); color: var(--fx-ink); box-shadow: 0 2px 10px rgb(0 0 0 / .18); cursor: pointer;
}
.pp-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pp-arrow:hover { background: var(--fx-accent); color: var(--fx-accent-ink); }
.pp-arrow.is-prev { left: 10px; }
.pp-arrow.is-next { right: 10px; }
.pp-count {
  position: absolute; right: 12px; bottom: 12px; padding: 3px 10px; border-radius: 999px;
  background: rgb(0 0 0 / .55); color: #fff; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.pp-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 12px 12px 4px; scroll-padding: 12px; }
.pp-thumbs::-webkit-scrollbar { display: none; }
.pp-thumbs button {
  flex: 0 0 64px; height: 80px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden;
  background: rgb(255 255 255 / .08); cursor: pointer; opacity: .55;
}
.pp-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-thumbs button:hover { opacity: .85; }
.pp-thumbs button[aria-selected="true"] { opacity: 1; border-color: #fff; }
.pp-dots { display: none; justify-content: center; gap: 6px; padding: 12px 0 2px; }
.pp-dots i { width: 6px; height: 6px; border-radius: 999px; background: rgb(255 255 255 / .35); }
.pp-dots i.is-on { width: 18px; background: #fff; }
.pp-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 12px; }
.pp-bar button {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 0; border-radius: 999px;
  font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.pp-today { background: transparent; color: rgb(255 255 255 / .75); }
.pp-today svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pp-today:hover { color: #fff; background: rgb(255 255 255 / .08); }
.pp-close { background: #fff; color: var(--fx-ink); padding-inline: 20px !important; }
.pp-close:hover { background: var(--fx-accent); color: var(--fx-accent-ink); }
/* 휴대폰: 화면 너비의 70%(최대 440px), 썸네일 대신 점 */
@media (max-width: 699px) {
  .popups { width: min(70vw, var(--pp-w)); max-width: min(70vw, var(--pp-w)); border-radius: 20px; }
  .pp-arrow, .pp-thumbs { display: none; }
  .pp-dots { display: flex; }
  .pp-bar { flex-direction: column; align-items: stretch; gap: 4px; }
  .pp-bar button { justify-content: center; }
}

/* 기존 사이트 reset.css 가 button·img 를 건드리는 것을 막는다 */
.popups button { margin: 0; line-height: 1.2; }
.popups img { border: 0; vertical-align: top; }

@media (prefers-reduced-motion: no-preference) {
  .popups[open] { animation: fxPopIn .35s cubic-bezier(.2, .8, .2, 1); }
  .pp-track { transition: height .3s ease; }
  .pp-dots i { transition: width .25s ease, background-color .25s ease; }
  .pp-thumbs button { transition: opacity .2s ease, border-color .2s ease; }
  .pp-close { transition: background-color .16s, color .16s; }
  @keyframes fxPopIn { from { opacity: 0; translate: 0 20px; scale: .97; } to { opacity: 1; translate: 0 0; scale: 1; } }
}
