/* =========================================================
   Price configurator (shared: index.html, prices.html)
   Figma: Web / Price configurator (47:4531)
   Photo (600×640) + booking card. Size tabs and package rows
   update the price, yearly line and row prices.
   ========================================================= */
.cfg { display: flex; align-items: center; gap: 40px; width: 100%; }

/* Photo with caption pill */
.cfg__photo { position: relative; flex-shrink: 0; width: 600px; height: 640px; border-radius: 16px; overflow: hidden; }
.cfg__photo img { width: 100%; height: 100%; object-fit: cover; }
.cfg__caption {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; gap: 6px; white-space: nowrap;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(20,20,18,.72); color: var(--background);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-size: 14px; line-height: 20px;
}
.cfg__caption strong { font-weight: 500; }
.cfg__caption .cfg__dim { opacity: .72; }
.cfg__caption [data-cfg-size-name], .cfg__caption [data-cfg-size-range] { display: inline-block; }
.cfg__caption > * { display: inline-block; }

/* Booking card */
.cfg__card {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
  padding: 28px; border-radius: 16px;
  background: var(--background); border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}
.cfg__price { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.cfg__price .t-price, .cfg__yearly, .cfg__pkg-price { display: inline-block; font-variant-numeric: tabular-nums; }
.cfg__label { color: var(--muted-foreground); }

/* Size tabs: a white thumb slides under the active tab (clip-path, so the pill keeps its radius) */
.cfg__sizes {
  position: relative; display: inline-flex; gap: 4px; padding: 4px;
  background: var(--muted); border-radius: 999px; isolation: isolate;
}
.cfg__thumb {
  position: absolute; inset: 0; z-index: -1; background: var(--background); border-radius: 999px;
  clip-path: inset(4px var(--thumb-r, 100%) 4px var(--thumb-l, 0px) round 999px);
}
.cfg.is-animated .cfg__thumb { transition: clip-path var(--dur-state) var(--ease-in-out); }
.cfg__size {
  padding: 6px 16px; border-radius: 999px;
  font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted-foreground);
  transition: color var(--dur-ui) ease;
  -webkit-tap-highlight-color: transparent;
}
.cfg__size[aria-checked="true"] { color: var(--foreground); }
/* Before JS measures, show the active tab with its own background */
.cfg:not(.is-ready) .cfg__size[aria-checked="true"] { background: var(--background); }
@media (hover: hover) and (pointer: fine) { .cfg__size:hover { color: var(--foreground); } }

/* Package rows */
.cfg__pkgs { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.cfg__pkg {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--border); box-shadow: inset 0 0 0 1px transparent;
  transition: border-color var(--dur-ui) ease, box-shadow var(--dur-ui) ease, transform var(--dur-press) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.cfg__pkg:active { transform: scale(0.99); }
.cfg__pkg[aria-checked="true"] { border-color: var(--foreground); box-shadow: inset 0 0 0 1px var(--foreground); }
@media (hover: hover) and (pointer: fine) { .cfg__pkg:hover { border-color: var(--foreground); } }
.cfg__radio { position: relative; flex-shrink: 0; width: 18px; height: 18px; }
.cfg__radio img { position: absolute; inset: 0; transition: opacity var(--dur-ui) ease, transform var(--dur-ui) var(--ease-out); }
.cfg__radio .is-on { opacity: 0; transform: scale(.6); }
.cfg__pkg[aria-checked="true"] .cfg__radio .is-on { opacity: 1; transform: none; }
.cfg__pkg-text { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.cfg__pkg-text .t-small { color: var(--muted-foreground); }
.cfg__pkg-price { font-size: 14px; line-height: 20px; color: var(--muted-foreground); white-space: nowrap; transition: color var(--dur-ui) ease; }
.cfg__pkg[aria-checked="true"] .cfg__pkg-price { color: var(--foreground); }

.cfg__card .btn { width: 100%; }
.cfg__note { width: 100%; text-align: center; color: var(--muted-foreground); }

/* Responsive: the mobile frame shows the booking card only */
@media (max-width: 1360px) {
  .cfg__photo { width: 48%; height: auto; aspect-ratio: 600 / 640; flex-shrink: 1; }
  .cfg__caption { left: 16px; right: 16px; bottom: 16px; transform: none; display: block; white-space: normal; border-radius: 16px; }
}
@media (max-width: 960px) {
  .cfg__photo { display: none; }
  .cfg__card { padding: 20px; gap: 16px; }
}
@media (max-width: 560px) {
  .cfg__pkg { gap: 12px; padding: 12px 14px; }
  .cfg__pkg-text .t-small { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .cfg.is-animated .cfg__thumb { transition: none; }
  .cfg__pkg:active { transform: none; }
  .cfg__radio img { transform: none !important; }
}
