/* Gifts (the skill's reference/gifts.md). Part 1, the gift card (.gc), stands alone on any page and takes the theme's
   --brand. Part 2, the gift pages (.gf), sits on assets/booking.css from the multi-service booking reference. */
.gc {
  --gc-primary: var(--bk-primary, var(--brand, #171717));
  --gc-fg: var(--bk-fg, #0d0d0d);
  --gc-card: var(--bk-card, #fff);
  --gc-muted: var(--bk-muted, #f2f2f2);
  --gc-muted-fg: var(--bk-muted-fg, #767676);
  --gc-border: var(--bk-border, #e5e5e5);
  --gc-input: var(--bk-input, #d3d3d3);
  --gc-danger: var(--bk-danger, #d4163a);
  --gc-ring: 0 0 0 3px color-mix(in oklab, var(--gc-primary) 40%, transparent);
  --gc-r: 16px;
  --rk-phone-ring: var(--gc-primary);
  --rk-phone-border: var(--gc-input);
  display: grid;
  gap: 20px;
  min-width: 0;
  color: var(--gc-fg);
}
.gc *, .gc *::before, .gc *::after { box-sizing: border-box; }
.gc :where(h3, p) { margin: 0; }
.gc [hidden] { display: none !important; }
.gc-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* the card is 16:9; small screens render the design page larger and scale it down, as Rekaz's storefront does,
   so its fixed-size logo text keeps its proportions */
.gc-preview { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid color-mix(in oklab, var(--gc-primary) 25%, transparent); border-radius: 24px; background: var(--gc-muted); box-shadow: 0 2px 8px rgb(19 19 19 / 0.08), 0 4px 20px rgb(19 19 19 / 0.12); }
.gc-preview iframe { position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 100%; height: 100%; border: 0; pointer-events: none; transform-origin: top left; }
[dir="rtl"] .gc-preview iframe { transform-origin: top right; }
@media (max-width: 767px) { .gc-preview iframe { width: 143%; height: 143%; scale: 0.7; } }
@media (max-width: 480px) { .gc-preview iframe { width: 200%; height: 200%; scale: 0.5; } }
@media (max-width: 360px) { .gc-preview iframe { width: 250%; height: 250%; scale: 0.4; } }

.gc-group { border: 1px solid var(--gc-border); border-radius: 24px; background: var(--gc-card); padding: 20px; }
@media (min-width: 640px) { .gc-group { padding: 24px; } }
.gc-group__title { margin-block-end: 20px; font-size: 16px; font-weight: 600; }
.gc-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .gc-grid { grid-template-columns: 1fr 1fr; } }
.gc-field + .gc-field { margin-block-start: 20px; }
.gc-grid .gc-field + .gc-field { margin-block-start: 0; }
.gc-label { display: block; margin-block-end: 8px; font-weight: 600; }
.gc-required { margin-inline-start: 4px; color: var(--gc-danger); }
.gc-input {
  width: 100%; height: 48px; border: 1px solid var(--gc-input); border-radius: var(--gc-r); background: var(--gc-card);
  padding-inline: 14px; font: inherit; font-size: 16px; color: inherit; outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.gc-input:focus { border-color: var(--gc-primary); box-shadow: var(--gc-ring); }
.gc-input:disabled { opacity: 0.55; }
.gc-field[data-invalid] .gc-input { border-color: var(--gc-danger); }
@media (min-width: 768px) { .gc-input { font-size: 14px; } }
.gc-textarea { height: auto; min-height: 112px; padding-block: 12px; resize: vertical; line-height: 1.5; }
.gc-count { margin-block-start: 6px; text-align: end; font-size: 12px; color: var(--gc-muted-fg); font-variant-numeric: tabular-nums; }
.gc-error { margin-block-start: 8px; font-size: 13px; font-weight: 500; color: var(--gc-danger); }
.gc-check { display: flex; align-items: center; gap: 12px; min-height: 52px; margin-block-start: 20px; padding: 14px 16px; border-radius: var(--gc-r); background: var(--gc-muted); font-weight: 500; cursor: pointer; }
.gc-check input { width: 18px; height: 18px; flex-shrink: 0; margin: 0; accent-color: var(--gc-primary); }

.gc-designs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .gc-designs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gc-design { display: block; overflow: hidden; border: 1px solid var(--gc-border); border-radius: var(--gc-r); background: var(--gc-card); cursor: pointer; transition: border-color 150ms ease, box-shadow 150ms ease; }
.gc-design img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--gc-muted); }
.gc-design__name { display: block; padding: 8px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.gc-design:has(input:checked) { border-color: var(--gc-primary); box-shadow: 0 0 0 2px var(--gc-primary); }
.gc-design:has(input:focus-visible) { box-shadow: var(--gc-ring); }
.gc-state { border-radius: 24px; background: var(--gc-card); padding: 48px 24px; text-align: center; }
.gc-state h3 { font-size: 19px; font-weight: 600; }
.gc-state p { margin-block-start: 8px; color: var(--gc-muted-fg); }

/* part 2: the gift pages, on booking.css */
/* one column while no summary card is shown: the catalog, the received gift, empty and error states */
.gf:not(:has(.bk-aside:not([hidden]))) .bk-layout { grid-template-columns: minmax(0, 1fr); }
.gf:not(:has(.bk-aside:not([hidden]))) .bk-titlebar > div { width: auto; }
.gf-types { display: grid; gap: 12px; max-width: 768px; }
@media (min-width: 640px) { .gf-types { grid-template-columns: 1fr 1fr; } }
.gf-type { display: flex; flex-direction: column; align-items: flex-start; min-height: 192px; padding: 24px; text-align: start; }
.gf-type strong { margin-block-start: auto; padding-block-start: 32px; font-size: 18px; line-height: 24px; font-weight: 600; }
.gf-type .bk-muted { margin-block-start: 4px; }
.gf-type .bk-badge-icon { width: 48px; height: 48px; border-radius: 16px; }
.gf-type .bk-badge-icon .bk-i { width: 24px; height: 24px; }
.gf-grid { display: grid; gap: 16px; margin-block-start: 24px; }
@media (min-width: 640px) { .gf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .gf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gf-item { display: block; overflow: hidden; color: inherit; text-decoration: none; }
.gf-item__image { display: grid; place-items: center; aspect-ratio: 1.55; background: var(--bk-muted); color: color-mix(in oklab, var(--bk-muted-fg) 55%, transparent); }
.gf-item__image img { width: 100%; height: 100%; object-fit: cover; }
.gf-item__image .bk-i { width: 40px; height: 40px; }
.gf-item__body { display: block; padding: 20px; }
.gf-item__body > * { display: block; }
.gf-search-empty { margin-block-start: 24px; }
.gf-kind { font-size: 12px; font-weight: 600; color: var(--bk-primary); }
.gf-item__name { margin-block-start: 8px; font-size: 18px; line-height: 24px; font-weight: 600; }
.gf-item__text { display: -webkit-box; margin-block-start: 4px; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gf-item__price { display: block; margin-block-start: 16px; font-weight: 600; }
.gf-back-link { margin-block-end: 12px; }
.gf-search { max-width: 512px; margin-block-start: 24px; }
.gf-hero { overflow: hidden; }
.gf-hero__image { aspect-ratio: 2.2; background: var(--bk-muted); }
.gf-hero__image img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 640px) { .gf-hero__image { aspect-ratio: 2.8; } }
.gf-hero__body { padding: 20px 24px 24px; }
.gf-hero__body h2 { margin-block-start: 8px; font-size: 24px; line-height: 32px; font-weight: 600; }
.gf-hero__body .bk-muted { margin-block-start: 8px; line-height: 24px; }
.gf-panel > * + * { margin-block-start: 20px; }
