/* Gift cards (business/gift-cards.js): card art, the tab, its windows and
   the motion when a card is issued, printed and used. Cards are white with
   bright colour light (owner, 11-29: no dark or tinted card backgrounds). */

.rl-gc-card {
  --gc-a: rgba(64, 224, 170, 0.62);
  --gc-b: rgba(92, 196, 255, 0.45);
  position: relative;
  width: 100%;
  aspect-ratio: 1.75 / 1;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  color: #16201c;
  background:
    radial-gradient(80% 120% at 100% 0%, var(--gc-a) 0%, transparent 62%),
    radial-gradient(70% 110% at 0% 100%, var(--gc-b) 0%, transparent 64%),
    #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(22, 32, 28, 0.09),
    0 24px 44px -26px rgba(52, 70, 120, 0.38),
    0 6px 14px -8px rgba(52, 70, 120, 0.16);
  container-type: inline-size;
  font-family: inherit;
}
/* The four designs. Two classes of weight, so a theme always beats the
   default colours each element sets for itself (cards, list thumbnails,
   design swatches). */
:is(.rl-gc-card, .rl-gc-mini, .rl-gc-swatch).theme-mint { --gc-a: rgba(64, 224, 170, 0.62); --gc-b: rgba(92, 196, 255, 0.45); }
:is(.rl-gc-card, .rl-gc-mini, .rl-gc-swatch).theme-sky { --gc-a: rgba(96, 168, 255, 0.6); --gc-b: rgba(168, 140, 255, 0.42); }
:is(.rl-gc-card, .rl-gc-mini, .rl-gc-swatch).theme-lilac { --gc-a: rgba(186, 136, 255, 0.58); --gc-b: rgba(255, 136, 198, 0.42); }
:is(.rl-gc-card, .rl-gc-mini, .rl-gc-swatch).theme-peach { --gc-a: rgba(255, 176, 102, 0.62); --gc-b: rgba(255, 122, 146, 0.42); }
.rl-gc-card.is-dim { filter: grayscale(0.85); opacity: 0.72; }
.rl-gc-card.is-unsold { filter: grayscale(0.35); }
.rl-gc-card-rings {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-radial-gradient(circle at 105% 115%, rgba(22, 32, 28, 0.06) 0 1px, transparent 1px 10px);
  -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 65%);
  mask-image: linear-gradient(200deg, #000 0%, transparent 65%);
}
.rl-gc-card-sheen {
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: 0;
  width: 55%;
  z-index: -1;
  background: linear-gradient(100deg, transparent 15%, rgba(255, 255, 255, 0.55) 42%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0.55) 58%, transparent 85%);
  animation: rl-gc-sheen 6.5s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}
@keyframes rl-gc-sheen {
  0% { transform: translateX(-130%) rotate(14deg); }
  55%, 100% { transform: translateX(230%) rotate(14deg); }
}
.rl-gc-card-in {
  position: absolute;
  inset: 0;
  padding: 7% 7.5%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.rl-gc-card-top, .rl-gc-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rl-gc-card-salon, .rl-gc-card-label {
  font-size: clamp(8px, 3.3cqw, 12px);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rl-gc-card-salon { color: #4b5752; }
.rl-gc-card-label {
  background: linear-gradient(90deg, #0ea47a, #3b6fe8 50%, #8b4fe3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  flex: none;
}
.rl-gc-card-figure { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.3em; row-gap: 0.15em; min-width: 0; }
.rl-gc-card-figure strong { font-size: clamp(22px, 15cqw, 64px); line-height: 1; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.rl-gc-card-figure > span { font-size: clamp(11px, 5.4cqw, 22px); font-weight: 700; }
.rl-gc-card-times { color: #4b5752; }
/* A long service name wraps to two lines on the card, never off it. */
.rl-gc-card-unit {
  flex: 1 1 7em;
  min-width: 0;
  line-height: 1.15;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rl-gc-card-mid p { margin: 0.35em 0 0; font-size: clamp(9px, 3.9cqw, 15px); font-weight: 600; color: #4b5752; }
.rl-gc-card-foot { font-size: clamp(8px, 3.4cqw, 13px); color: #4b5752; }
.rl-gc-card-foot span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-gc-card-code { font-family: ui-monospace, Menlo, monospace; letter-spacing: 0.14em; flex: none; }

.rl-gc-card.is-print { border-radius: 0; box-shadow: none; }
.rl-gc-card.is-print .rl-gc-card-sheen { display: none; }

.rl-gc-mini {
  --gc-a: rgba(64, 224, 170, 0.62);
  --gc-b: rgba(92, 196, 255, 0.45);
  position: relative;
  flex: none;
  width: 58px;
  height: 34px;
  border-radius: 7px;
  display: inline-flex;
  align-items: flex-end;
  padding: 0 0 4px 7px;
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 750;
  color: #16201c;
  background:
    radial-gradient(80% 120% at 100% 0%, var(--gc-a) 0%, transparent 62%),
    radial-gradient(70% 110% at 0% 100%, var(--gc-b) 0%, transparent 64%),
    #ffffff;
  box-shadow: inset 0 0 0 1px rgba(22, 32, 28, 0.1), 0 4px 10px -6px rgba(52, 70, 120, 0.32);
}
.rl-gc-mini.is-dim { filter: grayscale(0.9); opacity: 0.7; }

.rl-gc-barcode { display: block; image-rendering: pixelated; }
.rl-gc-barcode-wrap { position: relative; display: inline-flex; justify-content: center; max-width: 100%; overflow: hidden; padding: 6px 0; }
.rl-gc-barcode-wrap .rl-gc-barcode { max-width: 100%; }
.rl-gc-code { font-family: ui-monospace, Menlo, monospace; letter-spacing: 0.12em; }

/* ------------------------------------------------------------ tab */
.rl-gc-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rl-gc-header-actions button { display: inline-flex; align-items: center; gap: 6px; }
.rl-gc-icon { width: 18px; height: 18px; flex: none; }
.business-giftcards-stage, .rl-gc-host, .rl-gc-panel, .rl-gc-table-wrap { min-width: 0; max-width: 100%; }
.rl-gc-host, .rl-gc-page-body { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.rl-gc-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rl-gc-tile { background: #fff; border: 1px solid #e7e3da; border-radius: 16px; padding: 16px 18px; min-width: 0; }
.rl-gc-tile span { font-size: 13px; color: #5c6762; font-weight: 600; }
.rl-gc-tile strong { display: block; margin-top: 6px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rl-gc-tile p { margin: 4px 0 0; font-size: 12.5px; color: #77817c; }
.rl-gc-panel { background: #fff; border: 1px solid #e7e3da; border-radius: 18px; padding: 18px 20px; }
.rl-gc-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rl-gc-panel-head h3 { margin: 0; font-size: 17px; }
.rl-gc-panel-head p { margin: 0; font-size: 13px; color: #6c7671; }
.rl-gc-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.rl-gc-chip {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #ddd8ce;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #36413c;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
body.pro-mode .rl-gc-chip:not(#rl) { min-height: 0 !important; height: 30px; }
.rl-gc-chip:active { transform: scale(0.95); }
.rl-gc-chip:hover { border-color: #b9c4bf; }
.rl-gc-chip.is-on { background: #16201c; border-color: #16201c; color: #fff; }
.rl-gc-search { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #ddd8ce; color: #6c7671; min-width: 220px; }
.rl-gc-search input { border: 0; outline: 0; font: inherit; font-size: 14px; background: transparent; width: 100%; color: #16201c; }
.rl-gc-table-wrap { overflow-x: auto; }
.rl-gc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rl-gc-table th { text-align: left; font-size: 12.5px; color: #6c7671; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid #eee9e0; }
.rl-gc-table td { padding: 10px; border-bottom: 1px solid #f1ede5; vertical-align: middle; }
.rl-gc-tr { cursor: pointer; transition: background-color 0.15s ease; }
.rl-gc-tr:hover, .rl-gc-tr:focus-visible { background: #f8f6f1; outline: none; }
.rl-gc-cell-card { display: inline-flex; align-items: center; gap: 12px; }
.rl-gc-cell-card strong { display: block; font-weight: 650; }
.rl-gc-cell-card small { display: block; color: #6c7671; font-size: 12px; margin-top: 2px; }
.rl-gc-num { text-align: right; font-variant-numeric: tabular-nums; }
.rl-gc-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #e4f0ea; color: #1f6b52; white-space: nowrap; }
.rl-gc-pill.is-unsold { background: #eef0f6; color: #48506a; }
.rl-gc-pill.is-used_up { background: #f1efe9; color: #6c7671; }
.rl-gc-pill.is-expired { background: #fbefe2; color: #8a5320; }
.rl-gc-pill.is-void { background: #fbe9e7; color: #a23a2b; }
.rl-gc-more { display: flex; justify-content: center; padding-top: 12px; }
.rl-gc-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 36px 12px; color: #5c6762; }
.rl-gc-empty .rl-gc-icon { width: 34px; height: 34px; color: #1f6b52; }
.rl-gc-empty p { margin: 0; }
.rl-gc-empty button { margin-top: 10px; display: inline-flex; gap: 6px; align-items: center; }
.rl-gc-rows.is-loading .rl-gc-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; padding: 14px 10px; }
.rl-gc-runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rl-gc-run { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid #f1ede5; }
.rl-gc-run:first-child { border-top: 0; }
.rl-gc-run-num { width: 44px; height: 44px; border-radius: 12px; background: #f3f0ea; display: grid; place-items: center; font-weight: 700; color: #36413c; }
.rl-gc-run strong { font-weight: 650; }
.rl-gc-run p { margin: 2px 0 0; font-size: 13px; color: #6c7671; }
.rl-gc-run-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.rl-gc-run-actions button { display: inline-flex; align-items: center; gap: 6px; }

/* ------------------------------------------------------------ windows */
.rl-gc-body { padding-bottom: 24px; }
.rl-gc-columns { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.rl-gc-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* Each part of a form is its own white card, like checkout's. */
.rl-gc-section { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 16px 18px 18px; border-radius: 16px; border: 1px solid #e7e3da; background: #fff; }
.rl-gc-section-head h3 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; color: #16201c; letter-spacing: 0; text-transform: none; }
.rl-gc-section-head p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.45; color: #6c7671; }
.rl-gc-section-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rl-gc-preview { min-width: 0; }
.rl-gc-preview-stick { display: flex; flex-direction: column; gap: 14px; }
.rl-gc-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rl-gc-field > .rl-gc-seg, .rl-gc-field > .rl-gc-swatches { align-self: flex-start; }
.rl-gc-label { font-size: 13px; font-weight: 600; line-height: 1.3; color: #36413c; letter-spacing: 0; text-transform: none; }
.rl-gc-help { margin: 0; font-size: 12.5px; line-height: 1.45; color: #6c7671; }
.rl-gc-help.is-warn { color: #8a5320; }
.rl-gc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rl-gc-inline { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.rl-gc-row-gap { margin-top: 2px; }
.rl-gc-input { width: 100%; box-sizing: border-box; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid #ddd8ce; background: #fff; font: inherit; font-size: 15px; color: #16201c; }
.rl-gc-input:focus { outline: 2px solid #1f6b52; outline-offset: 1px; border-color: transparent; }
.rl-gc-textarea { height: auto; padding: 10px 14px; line-height: 1.45; resize: vertical; }
/* Segmented choice: compact; each option as wide as its words, wrapping
   onto a second row when there is no room; a thumb that slides (its place
   is measured by business/gift-cards.js measureSegs). */
.rl-gc-seg {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  padding: 3px;
  border-radius: 10px;
  background: #ece8e0;
  isolation: isolate;
}
.rl-gc-seg-thumb {
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  width: var(--thumb-w, 0);
  height: var(--thumb-h, 0);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(22, 32, 28, 0.14), 0 3px 8px -4px rgba(22, 32, 28, 0.22);
  transform: translate(var(--thumb-x, 0), var(--thumb-y, 0));
  opacity: 0;
}
.rl-gc-seg.is-measured .rl-gc-seg-thumb { opacity: 1; }
.rl-gc-seg[data-ready] .rl-gc-seg-thumb { transition: transform 260ms cubic-bezier(0.3, 0.7, 0.2, 1), width 260ms cubic-bezier(0.3, 0.7, 0.2, 1), height 260ms ease; }
body.pro-mode .rl-gc-seg button:not(#rl),
.rl-gc-seg button {
  flex: 1 0 auto;
  min-width: 0;
  min-height: 0 !important;
  height: auto;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  color: #5c6762;
  text-align: center;
  cursor: pointer;
  box-shadow: none;
  transition: color 200ms ease, background-color 200ms ease;
}
/* Before the first measure the chosen option is marked on its own. */
.rl-gc-seg:not(.is-measured) button.is-on { background: #fff; box-shadow: 0 1px 2px rgba(22, 32, 28, 0.14); }
.rl-gc-seg button:hover { color: #16201c; }
.rl-gc-seg button.is-on { color: #16201c; }
.rl-gc-seg button:focus-visible { outline: 2px solid #1f6b52; outline-offset: 1px; }
.rl-gc-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
body.pro-mode .rl-gc-swatch-pick:not(#rl),
.rl-gc-swatch-pick { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 0 !important; padding: 4px 4px 6px; border: 0; border-radius: 12px; background: transparent; font: inherit; cursor: pointer; box-shadow: none; }
.rl-gc-swatch {
  --gc-a: rgba(64, 224, 170, 0.62);
  --gc-b: rgba(92, 196, 255, 0.45);
  display: block;
  width: 64px;
  height: 40px;
  border-radius: 9px;
  background:
    radial-gradient(80% 120% at 100% 0%, var(--gc-a) 0%, transparent 62%),
    radial-gradient(70% 110% at 0% 100%, var(--gc-b) 0%, transparent 64%),
    #fff;
  box-shadow: inset 0 0 0 1px rgba(22, 32, 28, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rl-gc-swatch-name { font-size: 12px; font-weight: 600; color: #6c7671; transition: color 0.2s ease; }
.rl-gc-swatch-pick:hover .rl-gc-swatch { transform: translateY(-1px); }
.rl-gc-swatch-pick.is-on .rl-gc-swatch { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1f6b52; }
.rl-gc-swatch-pick.is-on .rl-gc-swatch-name { color: #16201c; }
.rl-gc-swatch-pick:focus-visible { outline: 2px solid #1f6b52; outline-offset: 1px; }
.rl-gc-footer-note { margin: 0; font-size: 14px; color: #4b5752; font-weight: 600; }
/* Payment: discount, tax and tip rows, then what it adds up to. */
.rl-gc-adjusts { display: flex; flex-direction: column; border-top: 1px solid #f1ede5; }
.rl-gc-adjust { display: grid; grid-template-columns: minmax(64px, 1fr) auto minmax(72px, 110px) minmax(72px, auto); gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f1ede5; }
.rl-gc-adjust-label { font-size: 13.5px; font-weight: 600; color: #36413c; }
.rl-gc-adjust .rl-gc-seg { flex-wrap: nowrap; }
body.pro-mode .rl-gc-adjust .rl-gc-seg button:not(#rl) { padding: 5px 10px; min-width: 28px; }
body.pro-mode .rl-gc-layer .rl-gc-adjust .rl-gc-input:not(#rl) { height: 34px !important; min-height: 34px !important; text-align: right; }
.rl-gc-adjust-amount { font-size: 13.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: #16201c; white-space: nowrap; }
.rl-gc-adjust-amount.is-zero { color: #a4aca8; font-weight: 500; }
.rl-gc-sum { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: #f7f5f0; }
.rl-gc-sum > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: #4b5752; }
.rl-gc-sum dt, .rl-gc-sum dd { margin: 0; }
.rl-gc-sum dd { font-variant-numeric: tabular-nums; font-weight: 600; color: #16201c; }
.rl-gc-sum > div.is-total { margin-top: 4px; padding-top: 8px; border-top: 1px solid #e7e3da; font-size: 15px; font-weight: 700; color: #16201c; }
.rl-gc-sum > div.is-total dd { font-weight: 750; }
/* Facts read as label / value rows. */
.rl-gc-facts { margin: 0; display: flex; flex-direction: column; width: 100%; }
.rl-gc-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-top: 1px solid #f1ede5; }
.rl-gc-facts > div:first-child { border-top: 0; padding-top: 0; }
.rl-gc-facts > div:last-child { padding-bottom: 0; }
.rl-gc-facts dt { flex: none; font-size: 13px; font-weight: 500; color: #6c7671; }
.rl-gc-facts dd { margin: 0; min-width: 0; font-size: 14px; font-weight: 600; text-align: right; overflow-wrap: anywhere; color: #16201c; }
.rl-gc-barcode-block { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 16px 14px; border-radius: 16px; border: 1px solid #e7e3da; background: #fff; overflow: hidden; }
.rl-gc-barcode-block .rl-gc-barcode { max-width: 100%; height: 56px; }
.rl-gc-barcode-block .rl-gc-code { font-size: 15px; font-weight: 600; letter-spacing: 0.18em; }
.rl-gc-terms summary { cursor: pointer; font-size: 13.5px; font-weight: 700; color: #36413c; }
.rl-gc-terms p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; color: #4b5752; white-space: pre-line; }
.rl-gc-subhead { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; color: #16201c; letter-spacing: 0; text-transform: none; }
.rl-gc-history { list-style: none; margin: 0; padding: 0; }
.rl-gc-entry { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #f1ede5; }
.rl-gc-entry:first-child { border-top: 0; }
.rl-gc-entry strong { font-size: 14px; }
.rl-gc-entry p { margin: 2px 0 0; font-size: 12.5px; color: #6c7671; }
.rl-gc-entry span { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rl-gc-entry.is-undone strong, .rl-gc-entry.is-undone span { text-decoration: line-through; color: #8b948f; }
.rl-gc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rl-gc-sell { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 18px; border-radius: 16px; border: 1px solid #e7e3da; background: #fff; }
.rl-gc-sell.is-danger { border-color: #f0d5d0; background: #fffafa; }
.rl-gc-wide { width: 100%; justify-content: center; }

.rl-gc-scan-card { width: 168px; height: 92px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px rgba(22, 32, 28, 0.1), 0 10px 22px -14px rgba(52, 70, 120, 0.45); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.rl-gc-scan-card .rl-gc-barcode { width: 140px; height: 30px; }
.rl-gc-scan-card i { font: 600 9px ui-monospace, Menlo, monospace; letter-spacing: 0.16em; font-style: normal; color: #36413c; }
.rl-gc-scan-line { position: absolute; left: 14%; right: 14%; height: 2px; border-radius: 2px; background: #1fb586; box-shadow: 0 0 12px 2px rgba(31, 181, 134, 0.55); animation: rl-gc-scanline 1.8s ease-in-out infinite; }
@keyframes rl-gc-scanline { 0%, 100% { top: 22%; } 50% { top: 76%; } }

/* Print preview */
.rl-gc-paper { background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px #e7e3da, 0 18px 36px -24px rgba(22, 32, 28, 0.4); padding: 12px; }
.rl-gc-paper-grid { display: grid; gap: 8px; }
/* One printed card: its front and back side by side, a cut line around and a
   dashed fold line between (the printed page, writePrintDocument). */
.rl-gc-paper-head { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #6c7671; text-align: center; }
.rl-gc-pair { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #c9d0cc; }
.rl-gc-pair-front .rl-gc-card { border-radius: 0; box-shadow: none; }
.rl-gc-pair .rl-gc-back { border: 0; border-left: 1.5px dashed #8f9995; border-radius: 0; background: #fff; }
.rl-gc-back { aspect-ratio: 1.75 / 1; border: 1px dashed #d8dfdb; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; overflow: hidden; }
.rl-gc-back .rl-gc-barcode { max-width: 90%; height: 26px; }
.rl-gc-back-salon { font-size: 7px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #4b5752; }
.rl-gc-back .rl-gc-code { font-size: 9px; font-weight: 600; }

/* ------------------------------------------------------------ motion */
/* Issued: the card rises, the code types out, the barcode draws under a
   scan beam and a check pops. Played once; Reduce Motion fades instead. */
.rl-gc-issued { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: center; padding: 12px 0; }
.rl-gc-issued-side { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.rl-gc-issued-title { margin: 0; font-size: 20px; font-weight: 700; }
.rl-gc-card.is-rise { animation: rl-gc-rise 0.9s cubic-bezier(0.2, 0.9, 0.25, 1) both; }
@keyframes rl-gc-rise {
  0% { opacity: 0; transform: translateY(36px) rotateX(18deg) scale(0.94); filter: blur(6px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: none; }
}
.rl-gc-code-big { font: 700 26px ui-monospace, Menlo, monospace; letter-spacing: 0.16em; white-space: nowrap; }
.rl-gc-code-big span { display: inline-block; animation: rl-gc-type 0.2s steps(2, end) both; }
@keyframes rl-gc-type { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rl-gc-barcode-wrap.is-draw .rl-gc-barcode-clip { animation: rl-gc-draw 1.1s cubic-bezier(0.6, 0, 0.3, 1) 1.5s both; }
@keyframes rl-gc-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.rl-gc-beam { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: #1fb586; box-shadow: 0 0 14px 3px rgba(31, 181, 134, 0.6); opacity: 0; animation: rl-gc-beam 1.1s cubic-bezier(0.6, 0, 0.3, 1) 1.5s both; }
@keyframes rl-gc-beam { 0% { opacity: 1; left: 0; } 92% { opacity: 1; } 100% { opacity: 0; left: 100%; } }
.rl-gc-check { position: relative; width: 52px; height: 52px; border-radius: 50%; background: #1f6b52; color: #fff; display: grid; place-items: center; animation: rl-gc-pop 0.55s cubic-bezier(0.3, 1.6, 0.5, 1) 2.6s both; }
.rl-gc-check .rl-gc-icon { width: 28px; height: 28px; stroke-width: 2.6; }
.rl-gc-check-ring { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #1fb586; animation: rl-gc-ring 0.9s ease-out 2.7s both; }
@keyframes rl-gc-pop { from { opacity: 0; transform: scale(0.3); } to { opacity: 1; transform: none; } }
@keyframes rl-gc-ring { from { opacity: 0.9; transform: scale(0.7); } to { opacity: 0; transform: scale(1.5); } }

/* Run ready: cards deal out and the count climbs. */
.rl-gc-ready { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.rl-gc-deck { position: relative; height: 300px; }
.rl-gc-ready-side { display: flex; flex-direction: column; gap: 18px; }
.rl-gc-deal { position: absolute; left: 50%; top: 50%; width: 260px; margin: -74px 0 0 -130px; animation: rl-gc-deal 0.8s cubic-bezier(0.2, 0.9, 0.25, 1) both; animation-delay: calc(var(--i) * 0.12s); transform: translate(calc((var(--i) - 2.5) * 26px), calc((var(--i) - 2.5) * -9px)) rotate(calc((var(--i) - 2.5) * 4deg)); }
@keyframes rl-gc-deal { from { opacity: 0; transform: translate(0, 60px) rotate(0) scale(0.9); } }
.rl-gc-counter { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.rl-gc-counter strong { font-size: 48px; font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.rl-gc-counter span { color: #4b5752; font-weight: 600; }
.rl-gc-steps { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: #36413c; font-size: 14px; }

/* Small cards: only what is left (checkout, customer window). */
.rl-gc-card.is-sm { border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(22, 32, 28, 0.1), 0 6px 14px -10px rgba(52, 70, 120, 0.4); }
.rl-gc-card.is-sm .rl-gc-card-in { padding: 9% 10%; justify-content: space-between; }
.rl-gc-card.is-sm .rl-gc-card-label { font-size: 7px; letter-spacing: 0.1em; line-height: 1.15; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.rl-gc-card-short { font-size: clamp(14px, 22cqw, 22px); font-weight: 750; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Checkout's Use gift card (business/checkout.js): the card and its name on
   top, what to take and the button across the whole width under them. */
.rl-gc-use-list { display: flex; flex-direction: column; gap: 10px; }
.rl-gc-use { display: grid; grid-template-columns: 76px minmax(0, 1fr); grid-template-areas: "art title" "controls controls"; column-gap: 12px; row-gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: #f7f5f0; }
.rl-gc-use-art { grid-area: art; display: block; }
.rl-gc-use-title { grid-area: title; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rl-gc-use-title strong { font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.rl-gc-use-title span { font-size: 12.5px; color: #6c7671; }
.rl-gc-use-controls { grid-area: controls; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rl-gc-use-controls .rl-gc-help { margin: 0; }
.rl-gc-use-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rl-gc-use-row .rl-gc-seg { width: 100%; }
.rl-gc-use-row .rl-checkout-money { flex: 1 1 110px; }
.rl-gc-finder { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; margin-top: 10px; }
.rl-gc-finder .rl-checkout-mark { width: auto; padding: 0 16px; white-space: nowrap; }
.rl-gc-finder input { font-family: ui-monospace, Menlo, monospace; letter-spacing: 0.1em; text-transform: uppercase; }
.rl-gc-finder input::placeholder { font-family: inherit; letter-spacing: normal; text-transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rl-gc-card-sheen, .rl-gc-scan-line { animation: none; }
  .rl-gc-card.is-rise, .rl-gc-code-big span, .rl-gc-barcode-wrap.is-draw .rl-gc-barcode-clip, .rl-gc-beam, .rl-gc-check, .rl-gc-check-ring, .rl-gc-deal {
    animation-duration: 0.15s !important;
    animation-delay: 0s !important;
  }
  .rl-gc-beam { display: none; }
}

@media (max-width: 1000px) {
  .rl-gc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rl-gc-columns, .rl-gc-issued, .rl-gc-ready { grid-template-columns: minmax(0, 1fr); }
  .rl-gc-preview { order: -1; }
  .rl-gc-preview-stick { position: static; }
}
@media (max-width: 640px) {
  /* Footers stack: the note on its own line, the buttons sharing the width. */
  body.pro-mode .rl-inv-layer.rl-gc-layer .rl-gc-footer.rl-inv-footer { flex-wrap: wrap; gap: 8px; }
  /* The total sits as one tight line above the buttons. */
  body.pro-mode .rl-gc-layer .rl-gc-footer > .rl-gc-footer-note:not(#rl) { flex: 1 1 100%; min-height: 0 !important; line-height: 1.3; }
  body.pro-mode .rl-gc-layer .rl-gc-footer > .business-team-drawer-footer-actions { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; margin-left: 0; }
  body.pro-mode .rl-gc-layer .rl-gc-footer > .business-team-drawer-footer-actions > button:not(#rl) { flex: 1 1 130px; min-width: 0; height: auto !important; min-height: 44px !important; padding: 8px 10px !important; white-space: normal !important; line-height: 1.2; }
  body.pro-mode .rl-gc-layer .rl-gc-footer > .business-team-drawer-footer-actions > .solid-button { flex-grow: 2; }
  .rl-gc-tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .rl-gc-tile { padding: 12px; }
  .rl-gc-tile strong { font-size: 21px; }
  .rl-gc-search { margin-left: 0; min-width: 0; width: 100%; }
  .rl-gc-two { grid-template-columns: 1fr; }
  .rl-gc-adjust { grid-template-columns: minmax(0, 1fr) auto 84px; row-gap: 4px; }
  .rl-gc-adjust-amount { grid-column: 1 / -1; justify-self: end; }
  .rl-gc-run { grid-template-columns: auto minmax(0, 1fr); }
  .rl-gc-run-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .rl-gc-table th:nth-child(2), .rl-gc-table td:nth-child(2), .rl-gc-table th:nth-child(4), .rl-gc-table td:nth-child(4) { display: none; }
  .rl-gc-table td { padding: 10px 6px; }
  .rl-gc-panel { padding: 14px; }
  .rl-gc-cell-card { gap: 8px; }
  .rl-gc-cell-card small { letter-spacing: 0.06em; }
  .rl-gc-deck { height: 220px; }
  .rl-gc-deal { width: 200px; margin: -57px 0 0 -100px; }
  .rl-gc-code-big { font-size: 20px; }
}

.rl-checkout-line.is-covered .rl-checkout-line-price { opacity: 0.55; }
.rl-checkout-line.is-covered .rl-checkout-line-price input { text-decoration: line-through; }
.rl-gc-covered { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-weight: 700; color: #1f6b52; }

/* The customer window's Gift cards card (platform.js renderCrmGiftCards). */
.rl-crm-gift-cards { margin-top: 16px; padding: 16px 18px; border-radius: 18px; background: #fff; border: 1px solid #e7e3da; }
.rl-crm-gift-cards h3 { margin: 0 0 10px; font-size: 15px; }
.rl-crm-gift-cards ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rl-crm-gc { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: center; }
.rl-crm-gc-art .rl-gc-card { border-radius: 9px; }
.rl-crm-gc strong { display: block; font-size: 14px; }
.rl-crm-gc small { display: block; margin-top: 2px; font-size: 12.5px; color: #6c7671; }

/* The window's fields follow the dashboard's (inventory.css: 40px, !important).
   Two need more room: the terms box shows several lines, and the scan code
   is large and monospaced so it reads like the card. */
body.pro-mode .rl-gc-layer textarea.rl-gc-input:not(#rl) {
  height: auto !important;
  min-height: 96px !important;
  padding: 10px 12px !important;
  line-height: 1.5 !important;
  resize: vertical;
}
body.pro-mode .rl-gc-layer .rl-gc-scan-form .rl-gc-input:not(#rl) {
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  font-size: 18px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.16em !important;
  text-align: center;
  text-transform: uppercase;
}
body.pro-mode .rl-gc-layer .rl-gc-scan-form .rl-gc-input:not(#rl)::placeholder { letter-spacing: 0.14em; color: #a4aca8; }

/* ------------------------------------------------------------ v3 windows
   Sell to a customer (person, mint) and Print blank cards (stack, lilac)
   look different from the first glance: their own icon in the header, and
   numbered questions down the left. */
.rl-gc-sheet-header { gap: 12px; }
.rl-gc-sheet-header > div { min-width: 0; flex: 1 1 auto; }
.rl-gc-head-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.rl-gc-head-icon .rl-gc-icon { width: 22px; height: 22px; }
.rl-gc-head-icon.is-user { background: #e1f3ea; color: #1f6b52; }
.rl-gc-head-icon.is-stack { background: #ece6fb; color: #5b45a8; }
.rl-gc-head-icon.is-scan { background: #e6eefb; color: #2f5ea8; }
.rl-gc-sheet-header p { margin: 2px 0 0; font-size: 13px; line-height: 1.4; color: #6c7671; }
/* Titles and the line under them wrap instead of being cut off. */
body.pro-mode .rl-gc-layer .rl-gc-sheet-header :is(h2, p):not(#rl) { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; }
body.pro-mode .rl-gc-layer .rl-gc-sheet-header h2:not(#rl) { line-height: 1.2; }

.rl-gc-step .rl-gc-section-head h3 { display: flex; align-items: center; gap: 10px; }
.rl-gc-step-num { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; background: #16201c; color: #fff; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
[data-giftcard-sheet="print"] .rl-gc-step-num { background: #5b45a8; }

/* Whole numbers: − field + in one pill; the field takes digits only. */
.rl-gc-count { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 3px; border-radius: 12px; background: #f1eee8; border: 1px solid #e4dfd5; }
body.pro-mode .rl-gc-count > button:not(#rl),
.rl-gc-count > button { width: 34px; height: 34px; min-height: 0 !important; padding: 0; border: 0; border-radius: 9px; background: #fff; display: grid; place-items: center; cursor: pointer; color: #16201c; box-shadow: 0 1px 2px rgba(22, 32, 28, 0.12); transition: transform 0.15s ease, opacity 0.15s ease; }
.rl-gc-count > button:active:not(:disabled) { transform: scale(0.92); }
.rl-gc-count > button:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
.rl-gc-count .rl-gc-icon { width: 16px; height: 16px; }
body.pro-mode .rl-gc-layer .rl-gc-count > .rl-gc-count-input:not(#rl) {
  width: 76px !important;
  min-width: 0 !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 6px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center;
  font-size: 17px !important;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
body.pro-mode .rl-gc-layer .rl-gc-count > .rl-gc-count-input:focus-visible:not(#rl) { background: #fff !important; box-shadow: 0 0 0 2px rgba(31, 107, 82, 0.35) !important; }
.rl-gc-count-input { width: 76px; border: 0; background: transparent; text-align: center; font: inherit; font-size: 17px; font-weight: 700; }

/* Money and percents: the sign sits inside the field. */
.rl-gc-money { position: relative; display: block; min-width: 0; }
.rl-gc-money-mark { position: absolute; top: 50%; transform: translateY(-50%); left: 13px; font-size: 15px; font-weight: 600; color: #6c7671; pointer-events: none; }
.rl-gc-money-mark.is-after { left: auto; right: 12px; }
body.pro-mode .rl-gc-layer .rl-gc-money.has-prefix > .rl-gc-input:not(#rl) { padding-left: 28px !important; }
body.pro-mode .rl-gc-layer .rl-gc-money.has-suffix > .rl-gc-input:not(#rl) { padding-right: 28px !important; }
body.pro-mode .rl-gc-layer .rl-gc-money > .rl-gc-input:not(#rl) { font-variant-numeric: tabular-nums; }
.rl-gc-money.is-compact .rl-gc-money-mark { font-size: 13.5px; left: 10px; }
.rl-gc-money.is-compact .rl-gc-money-mark.is-after { left: auto; right: 10px; }
body.pro-mode .rl-gc-layer .rl-gc-money.is-compact.has-prefix > .rl-gc-input:not(#rl) { padding-left: 22px !important; }
body.pro-mode .rl-gc-layer .rl-gc-money.is-compact.has-suffix > .rl-gc-input:not(#rl) { padding-right: 24px !important; }

/* Who the card is for. */
.rl-gc-person-search { position: relative; display: block; }
.rl-gc-person-search > .rl-gc-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: #77817c; pointer-events: none; }
body.pro-mode .rl-gc-layer .rl-gc-person-search > .rl-gc-input:not(#rl) { padding-left: 38px !important; height: 44px !important; min-height: 44px !important; font-size: 15px !important; }
.rl-gc-person-list { list-style: none; margin: 0; padding: 4px; display: flex; flex-direction: column; gap: 2px; border: 1px solid #e7e3da; border-radius: 12px; background: #fff; }
body.pro-mode .rl-gc-person-option:not(#rl),
.rl-gc-person-option { width: 100%; min-height: 0 !important; height: auto; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; font: inherit; color: #16201c; }
.rl-gc-person-option:hover, .rl-gc-person-option:focus-visible { background: #f3f7f4; outline: none; }
.rl-gc-person-option.is-name { color: #36413c; }
.rl-gc-avatar { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; background: #e1f3ea; color: #1f6b52; font-size: 13px; font-weight: 700; }
.rl-gc-avatar.is-plain { background: #f1eee8; color: #36413c; }
.rl-gc-avatar .rl-gc-icon { width: 16px; height: 16px; }
.rl-gc-person-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.rl-gc-person-text strong { font-size: 14.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-gc-person-text small { font-size: 12.5px; color: #6c7671; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-gc-person.is-picked { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 12px; background: #f3f8f5; border: 1px solid #d6e9df; }
.rl-gc-person.is-picked .rl-gc-avatar { width: 40px; height: 40px; font-size: 14px; background: #1f6b52; color: #fff; }
.rl-gc-person.is-picked > button { flex: 0 0 auto; }

/* Blank cards: a stack with how many, marked blank until sold. */
.rl-gc-stack { position: relative; padding: 18px 18px 26px 0; }
.rl-gc-stack-card { position: relative; }
.rl-gc-stack-card.is-3, .rl-gc-stack-card.is-2 { position: absolute; inset: 18px 18px 26px 0; }
.rl-gc-stack-card.is-3 { transform: translate(16px, 16px) rotate(2.5deg); opacity: 0.55; }
.rl-gc-stack-card.is-2 { transform: translate(8px, 8px) rotate(1.2deg); opacity: 0.8; }
.rl-gc-stack-count { position: absolute; right: 4px; top: 4px; z-index: 2; min-width: 48px; height: 32px; padding: 0 12px; border-radius: 999px; display: grid; place-items: center; background: #5b45a8; color: #fff; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: 0 8px 18px -10px rgba(91, 69, 168, 0.8); }
.rl-gc-stack-tag { position: absolute; left: 14px; bottom: 34px; z-index: 2; height: 26px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; background: rgba(255, 255, 255, 0.92); border: 1px dashed #8a7cc4; color: #5b45a8; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }

/* No cards yet: the two ways to start. */
.rl-gc-start { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 8px 0 4px; }
body.pro-mode .rl-gc-start-choice:not(#rl),
.rl-gc-start-choice { min-height: 0 !important; height: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; border-radius: 16px; border: 1px solid #e7e3da; background: #fbfaf7; text-align: left; cursor: pointer; font: inherit; color: #16201c; transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease; }
.rl-gc-start-choice:hover { border-color: #c9d6cf; box-shadow: 0 10px 24px -18px rgba(22, 32, 28, 0.45); }
.rl-gc-start-choice:active { transform: scale(0.99); }
.rl-gc-start-choice strong { font-size: 15.5px; font-weight: 700; }
.rl-gc-start-choice > span:last-child { font-size: 13px; line-height: 1.45; color: #5c6762; }
.rl-gc-start-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 4px; }
.rl-gc-start-icon .rl-gc-icon { width: 22px; height: 22px; }
.rl-gc-start-choice.is-issue .rl-gc-start-icon { background: #e1f3ea; color: #1f6b52; }
.rl-gc-start-choice.is-print .rl-gc-start-icon { background: #ece6fb; color: #5b45a8; }
/* One column: the questions come first, the preview after them. */
@media (max-width: 1000px) {
  :is([data-giftcard-sheet="issue"], [data-giftcard-sheet="print"]) .rl-gc-preview { order: 1; }
}
@media (max-width: 640px) {
  [data-giftcard-sheet="print"] .rl-gc-paper, [data-giftcard-sheet="print"] .rl-gc-paper + .rl-gc-help { display: none; }
  .rl-gc-start { grid-template-columns: minmax(0, 1fr); }
  .rl-gc-head-icon { width: 34px; height: 34px; border-radius: 10px; }
  .rl-gc-head-icon .rl-gc-icon { width: 19px; height: 19px; }
  .rl-gc-sheet-header p { font-size: 12.5px; }
  body.pro-mode .rl-gc-layer .rl-gc-sheet-header h2:not(#rl) { font-size: 19px !important; }
}

/* ------------------------------------------------------------ v4: Sell a gift card
   Questions down the left; on the right the card itself, live, on a stage lit
   in its colours, with everything that changes how it looks right under it.
   The stage's colours glide when the design changes (registered properties). */
@property --st-a { syntax: "<color>"; inherits: true; initial-value: rgba(64, 224, 170, 0.55); }
@property --st-b { syntax: "<color>"; inherits: true; initial-value: rgba(92, 196, 255, 0.45); }
.rl-gc-body.is-sale { padding-bottom: 20px; }
.rl-gc-sale-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.rl-gc-sale { display: flex; flex-direction: column; min-width: 0; }
.rl-gc-q { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 18px 0; border-top: 1px solid #efebe3; }
.rl-gc-q:first-child { padding-top: 2px; border-top: 0; }
.rl-gc-q-title { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 700; line-height: 1.3; color: #16201c; letter-spacing: 0; text-transform: none; }
.rl-gc-q-num { position: relative; flex: none; width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; background: #16201c; color: #fff; font-size: 12.5px; transition: background-color 0.35s ease; }
.rl-gc-q-num b { font-weight: 700; transition: opacity 0.2s ease, transform 0.25s ease; }
.rl-gc-q-num .rl-gc-icon { position: absolute; width: 15px; height: 15px; stroke-width: 2.8; opacity: 0; transform: scale(0.4); transition: opacity 0.2s ease, transform 0.35s cubic-bezier(0.3, 1.5, 0.5, 1); }
.rl-gc-q.is-done .rl-gc-q-num { background: #1f8a64; }
.rl-gc-q.is-done .rl-gc-q-num b { opacity: 0; transform: scale(0.4); }
.rl-gc-q.is-done .rl-gc-q-num .rl-gc-icon { opacity: 1; transform: none; }
.rl-gc-q-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding-left: 36px; }
.rl-gc-q-body > .rl-gc-seg { align-self: flex-start; }
.rl-gc-holds { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.rl-gc-pay-top { display: grid; grid-template-columns: minmax(120px, 168px) minmax(0, 1fr); gap: 12px; align-items: end; }
.rl-gc-pay-top .rl-gc-field > .rl-gc-seg { align-self: flex-start; }
body.pro-mode .rl-gc-layer .rl-gc-money.is-big > .rl-gc-input:not(#rl) { height: 54px !important; min-height: 54px !important; font-size: 22px !important; font-weight: 700; padding-left: 32px !important; }
.rl-gc-money.is-big .rl-gc-money-mark { font-size: 20px; left: 14px; color: #36413c; }

/* Discount, tax and tip side by side. */
.rl-gc-adjs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rl-gc-adj { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px; border-radius: 14px; border: 1px solid #ece8e0; background: #fff; }
.rl-gc-adj-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.rl-gc-adj-head .rl-gc-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-gc-adj .rl-gc-seg { flex-wrap: nowrap; padding: 2px; background: #efebe3; }
body.pro-mode .rl-gc-adj .rl-gc-seg button:not(#rl) { padding: 3px 8px; min-width: 24px; font-size: 12.5px; }
body.pro-mode .rl-gc-layer .rl-gc-adj .rl-gc-input:not(#rl) { height: 36px !important; min-height: 36px !important; text-align: right; background: #fff !important; }
.rl-gc-adj-amount { font-size: 12.5px; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; color: #16201c; transition: color 0.2s ease; }
.rl-gc-adj-amount.is-zero { color: #a4aca8; font-weight: 500; }

/* Who it's for: a new customer. */
.rl-gc-newperson { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; border: 1px solid #d6e9df; background: #f6faf8; animation: rl-gc-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.rl-gc-newperson-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rl-gc-newperson-head > button { flex: none; }
.rl-gc-avatar.is-new { background: #1f6b52; color: #fff; }
.rl-gc-iconfield { position: relative; display: block; min-width: 0; }
.rl-gc-iconfield > .rl-gc-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: #77817c; pointer-events: none; }
body.pro-mode .rl-gc-layer .rl-gc-iconfield > .rl-gc-input:not(#rl) { padding-left: 38px !important; background: #fff !important; }
body.pro-mode .rl-gc-layer .rl-gc-input[aria-invalid="true"]:not(:focus):not(#rl) { border-color: #d9826f !important; background: #fff8f6 !important; }
.rl-gc-two.is-contact { gap: 10px; }
.rl-gc-match { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 12px; border: 1px dashed #a9cdbb; background: #fff; animation: rl-gc-in 0.3s ease both; }
.rl-gc-match > button { flex: none; }
.rl-gc-person-list { animation: rl-gc-in 0.22s ease both; }
.rl-gc-person-option.is-new strong { color: #1f6b52; }
body.pro-mode .rl-gc-newlink:not(#rl),
.rl-gc-newlink { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 0 !important; height: auto; padding: 2px 0; border: 0; background: transparent; box-shadow: none; font: inherit; font-size: 13.5px; font-weight: 650; color: #1f6b52; cursor: pointer; }
.rl-gc-newlink:hover span { text-decoration: underline; text-underline-offset: 3px; }
.rl-gc-newlink .rl-gc-icon { width: 17px; height: 17px; }
.rl-gc-person-note { display: flex; align-items: center; gap: 6px; }
.rl-gc-person-note .rl-gc-icon { flex: none; width: 15px; height: 15px; color: #1f8a64; }
@keyframes rl-gc-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* The stage. */
.rl-gc-stage { --st-a: rgba(64, 224, 170, 0.55); --st-b: rgba(92, 196, 255, 0.45); display: flex; flex-direction: column; min-width: 0; border-radius: 22px; border: 1px solid #ece8e0; background: #fff; overflow: hidden; transition: --st-a 0.7s ease, --st-b 0.7s ease; }
.rl-gc-stage.theme-sky { --st-a: rgba(96, 168, 255, 0.55); --st-b: rgba(168, 140, 255, 0.42); }
.rl-gc-stage.theme-lilac { --st-a: rgba(186, 136, 255, 0.55); --st-b: rgba(255, 136, 198, 0.42); }
.rl-gc-stage.theme-peach { --st-a: rgba(255, 176, 102, 0.58); --st-b: rgba(255, 122, 146, 0.42); }
.rl-gc-show {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 30px 28px 20px;
  overflow: hidden;
  background:
    radial-gradient(90% 75% at 90% 0%, var(--st-b), transparent 70%),
    radial-gradient(80% 80% at 0% 100%, var(--st-a), transparent 72%),
    #f6f4ef;
  animation: rl-gc-show-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes rl-gc-show-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.rl-gc-show::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-radial-gradient(circle at 50% 120%, rgba(22, 32, 28, 0.035) 0 1px, transparent 1px 14px); pointer-events: none; }
.rl-gc-show-glow { position: absolute; left: 14%; right: 14%; top: 16%; bottom: 26%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, var(--st-a), transparent); filter: blur(26px); opacity: 0.55; pointer-events: none; animation: rl-gc-breathe 5s ease-in-out infinite; }
@keyframes rl-gc-breathe { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.7; } }
.rl-gc-float { width: min(100%, 400px); animation: rl-gc-float 6s ease-in-out infinite; }
@keyframes rl-gc-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.rl-gc-tilt { position: relative; transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform var(--tilt-ease, 0.6s) cubic-bezier(0.2, 0.8, 0.2, 1); will-change: transform; }
.rl-gc-tilt > .rl-gc-card { box-shadow: inset 0 0 0 1px rgba(22, 32, 28, 0.08), 0 30px 50px -28px rgba(40, 56, 100, 0.5), 0 8px 18px -10px rgba(40, 56, 100, 0.22); }
.rl-gc-fxclip { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; pointer-events: none; }
.rl-gc-glare { position: absolute; inset: 0; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 55%); opacity: calc(var(--glare, 0) * 0.75); mix-blend-mode: soft-light; transition: opacity 0.35s ease; }
.rl-gc-sweep { position: absolute; top: -25%; bottom: -25%; left: 0; width: 42%; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0)); }
.rl-gc-burst { position: absolute; left: 50%; top: 44%; width: min(80%, 420px); aspect-ratio: 1.75 / 1; border-radius: 26px; border: 2px solid var(--st-a); pointer-events: none; }
.rl-gc-spark { position: absolute; z-index: 3; border-radius: 50%; background: var(--st-a); box-shadow: 0 0 10px var(--st-a); pointer-events: none; }
.rl-gc-spark.is-b { background: var(--st-b); box-shadow: 0 0 10px var(--st-b); }
.rl-gc-card-exp { flex: none; font-weight: 650; color: #36413c; }
.rl-gc-note-tag { margin: 0; max-width: 92%; font-size: 12.5px; line-height: 1.4; text-align: center; color: #6c7671; overflow-wrap: anywhere; }
.rl-gc-note-tag.is-on { padding: 9px 16px; border-radius: 12px; background: #fff; color: #36413c; font-size: 14px; font-style: italic; box-shadow: 0 10px 22px -14px rgba(22, 32, 28, 0.4); transform: rotate(-1deg); }
.rl-gc-looks { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; border-top: 1px solid #ece8e0; }
.rl-gc-looks-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rl-gc-looks .rl-gc-swatches { gap: 10px; }
body.pro-mode .rl-gc-looks .rl-gc-swatch-pick:not(#rl) { padding: 0; border-radius: 999px; }
.rl-gc-looks .rl-gc-swatch { width: 34px; height: 34px; border-radius: 999px; background: linear-gradient(135deg, var(--gc-a) 10%, var(--gc-b) 90%), #fff; box-shadow: inset 0 0 0 1px rgba(22, 32, 28, 0.1); transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1), box-shadow 0.25s ease; }
.rl-gc-looks .rl-gc-swatch-pick:hover .rl-gc-swatch { transform: scale(1.1); }
.rl-gc-looks .rl-gc-swatch-pick.is-on .rl-gc-swatch { transform: scale(1.08); }
.rl-gc-looks .rl-gc-swatch-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Footer: the total, how it was worked out, and a button that shines once
   the sale is ready. */
.rl-gc-total { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.rl-gc-total small { font-size: 12px; font-weight: 600; color: #6c7671; }
.rl-gc-total strong { display: inline-block; font-size: 22px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: #16201c; transform-origin: left center; }
.rl-gc-total em { font-style: normal; font-size: 12px; font-weight: 500; color: #6c7671; font-variant-numeric: tabular-nums; }
.rl-gc-go { position: relative; overflow: hidden; }
.rl-gc-shine { position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0)); pointer-events: none; }

/* ------------------------------------------------------------ v4: Scan
   The camera fills the window from the start; typing the code, a USB
   scanner tip and the latest cards sit beside it. */
.rl-gc-body.is-scan { display: flex; flex-direction: column; }
.rl-gc-scan-grid { flex: 1 0 auto; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 22px; align-items: stretch; min-height: 0; }
.rl-gc-cam { position: relative; isolation: isolate; min-height: 440px; border-radius: 22px; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #29332f, #0e1412); color: #fff; }
.rl-gc-cam-video, .rl-gc-cam-video video { position: absolute; inset: 0; width: 100%; height: 100%; }
.rl-gc-cam-video { opacity: 0; transition: opacity 0.5s ease; }
.rl-gc-cam-video video { object-fit: cover; }
.rl-gc-cam.is-live .rl-gc-cam-video { opacity: 1; }
.rl-gc-cam-frame { position: absolute; left: 50%; top: 47%; z-index: 1; width: min(72%, 440px); aspect-ratio: 1.75 / 1; border-radius: 20px; transform: translate(-50%, -50%); box-shadow: 0 0 0 200vmax rgba(8, 12, 10, 0.42); transition: box-shadow 0.3s ease; }
.rl-gc-cam-frame i { position: absolute; width: 36px; height: 36px; border: 3px solid #fff; transition: border-color 0.25s ease; }
.rl-gc-cam-frame i:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 20px; }
.rl-gc-cam-frame i:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 20px; }
.rl-gc-cam-frame i:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 20px; }
.rl-gc-cam-frame i:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 20px; }
.rl-gc-cam-laser { position: absolute; left: 7%; right: 7%; top: 50%; height: 2px; border-radius: 2px; background: #3ee0a7; box-shadow: 0 0 14px 3px rgba(62, 224, 167, 0.7); animation: rl-gc-laser 2.2s ease-in-out infinite; }
@keyframes rl-gc-laser { 0%, 100% { top: 14%; } 50% { top: 86%; } }
.rl-gc-cam.is-starting .rl-gc-cam-laser { opacity: 0.35; }
.rl-gc-cam.is-reading .rl-gc-cam-frame i { border-color: #3ee0a7; }
.rl-gc-cam.is-reading .rl-gc-cam-frame { animation: rl-gc-caught 0.6s ease-out; }
@keyframes rl-gc-caught { 0% { transform: translate(-50%, -50%) scale(1); } 40% { transform: translate(-50%, -50%) scale(1.04); } 100% { transform: translate(-50%, -50%) scale(1); } }
.rl-gc-cam-hint { position: absolute; left: 50%; bottom: 18px; z-index: 2; max-width: calc(100% - 32px); margin: 0; padding: 8px 14px; border-radius: 999px; transform: translateX(-50%); background: rgba(14, 20, 18, 0.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-gc-cam-status { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; }
.rl-gc-cam-status strong { font-size: 18px; font-weight: 700; }
.rl-gc-cam-status p { margin: 0; max-width: 340px; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, 0.78); }
.rl-gc-cam-status button { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; }
.rl-gc-cam:is(.is-denied, .is-unavailable, .is-unsupported, .is-error, .is-none) { background: #f6f4ef; color: #16201c; border: 1px solid #ece8e0; }
.rl-gc-cam-status.is-problem p { color: #5c6762; }
.rl-gc-cam-art { position: relative; width: 220px; height: 126px; margin-bottom: 6px; border-radius: 18px; background: #ebe6dc; display: grid; place-items: center; overflow: hidden; }
.rl-gc-cam-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.22); border-top-color: #fff; animation: rl-gc-spin 0.9s linear infinite; }
@keyframes rl-gc-spin { to { transform: rotate(360deg); } }
body.pro-mode .rl-gc-cam-torch:not(#rl),
.rl-gc-cam-torch { position: absolute; top: 14px; right: 14px; z-index: 3; width: 44px; height: 44px; min-height: 0 !important; padding: 0; border: 0; border-radius: 999px; display: grid; place-items: center; background: rgba(14, 20, 18, 0.55); color: #fff; cursor: pointer; }
.rl-gc-cam-torch[aria-pressed="true"] { background: #fff; color: #16201c; }
.rl-gc-scan-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rl-gc-scan-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
body.pro-mode .rl-gc-layer .rl-gc-scan-form > button:not(#rl) { height: 48px; min-height: 48px; }
.rl-gc-scan-tip { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #f3f8f5; color: #1f6b52; }
.rl-gc-scan-tip p { margin: 0; font-size: 13px; line-height: 1.45; color: #36413c; }
.rl-gc-recent ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
body.pro-mode .rl-gc-recent-row:not(#rl),
.rl-gc-recent-row { width: 100%; min-height: 0 !important; height: auto; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 12px; background: transparent; box-shadow: none; text-align: left; font: inherit; color: #16201c; cursor: pointer; transition: background-color 0.15s ease; }
.rl-gc-recent-row:hover, .rl-gc-recent-row:focus-visible { background: #f6f4ef; outline: none; }
.rl-gc-recent-left { flex: none; margin-left: auto; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rl-gc-scan-note { margin-top: auto; }

@media (prefers-reduced-motion: reduce) {
  .rl-gc-show, .rl-gc-float, .rl-gc-show-glow, .rl-gc-cam-laser, .rl-gc-newperson, .rl-gc-match, .rl-gc-person-list { animation: none !important; }
  .rl-gc-tilt { transform: none !important; }
}
@media (max-width: 1000px) {
  .rl-gc-sale-grid, .rl-gc-scan-grid { grid-template-columns: minmax(0, 1fr); }
  /* With an aspect ratio a grid item no longer stretches on its own. */
  .rl-gc-cam { width: 100%; min-height: 240px; aspect-ratio: 4 / 3; justify-self: stretch; align-self: start; }
  .rl-gc-cam-hint { width: max-content; white-space: normal; text-align: center; border-radius: 14px; }
}
@media (max-width: 640px) {
  .rl-gc-q-body { padding-left: 0; }
  .rl-gc-holds, .rl-gc-pay-top { grid-template-columns: minmax(0, 1fr); }
  .rl-gc-adjs { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .rl-gc-adj { display: grid; grid-template-columns: minmax(0, 1fr) auto 92px; align-items: center; column-gap: 8px; row-gap: 2px; padding: 8px 10px; }
  .rl-gc-adj-head { display: contents; }
  .rl-gc-adj-amount { grid-column: 1 / -1; }
  .rl-gc-show { padding: 22px 16px 16px; }
  .rl-gc-looks { padding: 16px; }
  .rl-gc-cam { aspect-ratio: 1 / 1; border-radius: 18px; }
  .rl-gc-cam-frame { width: 82%; }
  .rl-gc-total strong { font-size: 20px; }
}
.rl-gc-newperson-head .rl-gc-person-text small, .rl-gc-match .rl-gc-person-text small { white-space: normal; overflow: visible; }

/* An (i) beside a choice that explains it on hover, focus or tap
   (business/gift-cards.js infoTip). The bubble is a popover in the top layer,
   placed by placeInfo; without popovers it opens under the (i). */
.rl-gc-seg-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.rl-gc-info { position: relative; flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; border: 1px solid #d6d1c6; background: #fff; color: #55605b; cursor: help; transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
.rl-gc-info-mark { font: italic 700 13px/1 Georgia, "Times New Roman", serif; }
.rl-gc-info:is(:hover, :focus-visible, .is-open) { border-color: #1f6b52; background: #e8f2ec; color: #1f6b52; outline: none; }
[data-giftcard-sheet="print"] .rl-gc-info:is(:hover, :focus-visible, .is-open) { border-color: #5b45a8; background: #efebfa; color: #5b45a8; }
.rl-gc-info:focus-visible { box-shadow: 0 0 0 3px rgba(91, 69, 168, 0.25); }
.rl-gc-info-tip { position: fixed; inset: auto; margin: 0; box-sizing: border-box; width: min(340px, calc(100vw - 24px)); padding: 14px 16px; border: 0; border-radius: 14px; background: #16201c; color: #f4f2ec; box-shadow: 0 18px 40px -12px rgba(22, 32, 28, 0.45), 0 2px 6px rgba(22, 32, 28, 0.18); font: inherit; font-size: 13px; font-weight: 500; line-height: 1.5; text-align: left; cursor: auto; overflow: visible; }
.rl-gc-info-tip:popover-open { animation: rl-gc-info-in 160ms ease-out; }
.rl-gc-info-title { display: block; margin: 0 0 8px; font-size: 13.5px; font-weight: 700; color: #fff; }
.rl-gc-info-steps { display: grid; gap: 6px; }
.rl-gc-info-step { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 2px; }
.rl-gc-info-step > b { color: #b9a9ef; font-weight: 700; font-variant-numeric: tabular-nums; }
/* In a window's header (Print cards) the (i) sits after the line it explains. */
.rl-gc-sheet-header p .rl-gc-info { width: 22px; height: 22px; margin-left: 4px; vertical-align: middle; }
.rl-gc-info-tip, .rl-gc-info-tip * { text-transform: none; letter-spacing: 0; }
.rl-gc-info-note { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.14); color: #d7d3ca; font-size: 12.5px; }
@keyframes rl-gc-info-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rl-gc-info-tip:popover-open { animation: none; } }
@supports not selector(:popover-open) {
  .rl-gc-info-tip { display: none; position: absolute; left: 50%; top: calc(100% + 10px); z-index: 40; transform: translateX(-50%); }
  .rl-gc-info:is(:hover, :focus-within, .is-open) .rl-gc-info-tip { display: block; }
}

/* ------------------------------------------------------------ tab v3
   Owner, 2026-11-30: print runs first, then the cards in groups of what
   they hold; a group (or a run) opens a window with its cards. Filters
   never blank the page: groups carry every count, and a list that asks
   again keeps its last answer, faded, under a thin bar. */
.rl-gc-panel-head > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }

/* Totals: one strip, four equal cells, each with one line under it. */
.rl-gc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: #eeeae2; border: 1px solid #e7e3da; border-radius: 18px; overflow: hidden; }
.rl-gc-stat { background: #fff; padding: 16px 20px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rl-gc-stat > span { font-size: 13px; color: #5c6762; font-weight: 600; }
.rl-gc-stat > strong { font-size: 24px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rl-gc-stat > p { margin: 0; font-size: 12.5px; color: #77817c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Print runs: a card per run; the whole card opens it, its buttons act. */
.rl-gc-runcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 12px; }
.rl-gc-runcard { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 14px 10px; border: 1px solid #ece8df; border-radius: 16px; background: #fbfaf7; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease; animation: rl-gc-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.rl-gc-runcard:hover { border-color: #c9d6cf; box-shadow: 0 12px 26px -20px rgba(22, 32, 28, 0.5); }
.rl-gc-runcard:has(> .rl-gc-runcard-open:active) { transform: scale(0.99); }
body.pro-mode .rl-gc-runcard > .rl-gc-runcard-open:not(#rl) { position: absolute; inset: 0; z-index: 0; width: auto; height: auto !important; min-height: 0 !important; padding: 0 !important; margin: 0; border: 0 !important; border-radius: inherit; background: transparent !important; box-shadow: none !important; cursor: pointer; }
body.pro-mode .rl-gc-runcard > .rl-gc-runcard-open:not(#rl):focus-visible { outline: 2px solid #236c59 !important; outline-offset: 2px !important; }
.rl-gc-runcard > :not(.rl-gc-runcard-open) { position: relative; z-index: 1; pointer-events: none; }
.rl-gc-runcard > .rl-gc-runcard-actions { pointer-events: auto; }
.rl-gc-runcard-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
.rl-gc-runcard-top strong { display: block; font-size: 15px; font-weight: 700; }
.rl-gc-runcard-top p, .rl-gc-runcard-meta { margin: 2px 0 0; font-size: 13px; color: #5c6762; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-gc-runcard-meta { margin: 0; font-size: 12.5px; color: #77817c; }
.rl-gc-runcard-actions { display: flex; gap: 2px; flex-wrap: wrap; margin: 0 -8px; padding-top: 6px; border-top: 1px solid #efebe3; }
.rl-gc-runcard-actions button { display: inline-flex; align-items: center; gap: 6px; }

/* One card with two behind it: a group of cards. */
.rl-gc-stack { position: relative; display: inline-block; flex: none; width: 58px; height: 34px; margin: 5px 7px 0 0; }
.rl-gc-stack::before, .rl-gc-stack::after { content: ""; position: absolute; inset: 0; border-radius: 7px; background: #fff; box-shadow: inset 0 0 0 1px rgba(22, 32, 28, 0.1), 0 3px 8px -6px rgba(52, 70, 120, 0.3); }
.rl-gc-stack::before { transform: translate(7px, -5px); opacity: 0.55; }
.rl-gc-stack::after { transform: translate(3.5px, -2.5px); opacity: 0.85; }
.rl-gc-stack > .rl-gc-mini { position: relative; z-index: 1; }

/* How many cards are in each state: a bar and its words. */
.rl-gc-bar { display: flex; gap: 2px; height: 6px; border-radius: 999px; overflow: hidden; background: #f1eee7; }
.rl-gc-bar > i { min-width: 4px; height: 100%; transition: flex-grow 0.4s ease; }
.rl-gc-bar > .is-active, .rl-gc-legend > .is-active::before { background: #2f8f6d; }
.rl-gc-bar > .is-expired, .rl-gc-legend > .is-expired::before { background: #e0a35c; }
.rl-gc-bar > .is-used_up, .rl-gc-legend > .is-used_up::before { background: #b9c1bd; }
.rl-gc-bar > .is-void, .rl-gc-legend > .is-void::before { background: #d9796a; }
.rl-gc-bar > .is-unsold, .rl-gc-legend > .is-unsold::before { background: #9aa3c2; }
.rl-gc-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: #5c6762; }
.rl-gc-legend > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.rl-gc-legend > span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; }

/* The cards panel: filters and search on one line, then the groups. */
.rl-gc-toolbar { display: flex; gap: 10px 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.rl-gc-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-width: 0; }
/* The same search pill as Bookings, Customers and Inventory: 40px, the
   line colour, a 16px magnifier, 14px text; focus is focus.css's one line
   on the pill (.text-entry-shell). */
.rl-gc-toolbar > .rl-gc-search { --text-entry-border: var(--color-line, #e3e7e4); margin-left: auto; height: 40px; min-width: 240px; padding: 0 14px; gap: 8px; border-color: var(--color-line, #e3e7e4); background: #fbfbfa; color: var(--color-faint, #8b978f); }
.rl-gc-toolbar > .rl-gc-search > .rl-gc-icon { width: 16px; height: 16px; stroke-width: 1.6; }
/* The pill is the field: the input inside it draws nothing of its own.
   The app's input rules (and the windows' inventory layer, at 1-3-2) give
   every input a height, border, fill and shadow, hence two IDs here. */
body.pro-mode .rl-gc-search > input:not(#rl):not(#gc)::placeholder { color: var(--color-faint, #8b978f); }
body.pro-mode .rl-gc-search > input:not(#rl):not(#gc) { flex: 1 1 auto; min-width: 0; font-size: 0.875rem !important; font-weight: 450; color: var(--color-ink, #16201c) !important; height: 100% !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0 !important; }
.rl-gc-chip { display: inline-flex; align-items: center; gap: 6px; }
.rl-gc-chip-count { font-size: 12px; font-weight: 600; color: #77817c; font-variant-numeric: tabular-nums; }
.rl-gc-chip.is-on .rl-gc-chip-count { color: rgba(255, 255, 255, 0.7); }

.rl-gc-cards-body { position: relative; min-height: 120px; }
.rl-gc-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
body.pro-mode .rl-gc-group:not(#rl) {
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 10px;
  height: auto !important; min-height: 0 !important; padding: 16px !important; margin: 0;
  text-align: left; white-space: normal !important; font: inherit; color: #16201c;
  border: 1px solid #ece8df !important; border-radius: 16px !important; background: #fff !important; box-shadow: none;
  cursor: pointer; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  animation: rl-gc-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
body.pro-mode .rl-gc-group:not(#rl):hover { border-color: #c9d6cf !important; box-shadow: 0 12px 26px -20px rgba(22, 32, 28, 0.5); transform: translateY(-1px); }
body.pro-mode .rl-gc-group:not(#rl):active { transform: scale(0.99); }
body.pro-mode .rl-gc-group:not(#rl):focus-visible { outline: 2px solid #236c59 !important; outline-offset: 2px !important; }
.rl-gc-group-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.rl-gc-group-name { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rl-gc-group-name strong { font-size: 15px; line-height: 1.3; font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.rl-gc-group-name > span { font-size: 13px; color: #5c6762; }
.rl-gc-group-go { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #8d9792; background: #f5f3ee; transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.rl-gc-group:hover .rl-gc-group-go { background: #e1f3ea; color: #1f6b52; transform: translateX(2px); }
.rl-gc-group-left { padding-top: 10px; border-top: 1px solid #f3f0ea; font-size: 13px; font-weight: 650; color: #1f6b52; }
@keyframes rl-gc-in { from { opacity: 0; transform: translateY(6px) scale(0.985); } }

/* Loading: outlines only on the first load, in the shape of what comes. */
.rl-gc-runcard.is-sk { gap: 12px; min-height: 150px; animation: none; }
.rl-gc-runcard.is-sk .rl-gc-group-name { gap: 8px; }
:is(.rl-gc-runcard.is-sk, .rl-gc-group.is-sk) .sk { display: block; border-radius: 999px; background: linear-gradient(100deg, #f1eee7 30%, #f9f8f4 50%, #f1eee7 70%) 0 0 / 250% 100%; animation: rl-skel-sheen 1.6s ease-in-out infinite; }
.rl-gc-runcard.is-sk .sk-art { width: 58px; height: 34px; border-radius: 7px; }
.rl-gc-runcard.is-sk .sk-line { height: 11px; width: 70%; }
.rl-gc-runcard.is-sk .sk-line.is-short { width: 42%; }
.rl-gc-runcard.is-sk .sk-bar { height: 6px; }
.rl-gc-group.is-sk { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid #f0ece4; border-radius: 16px; background: #fff; animation: none; }
:is(.rl-gc-group.is-sk, .rl-gc-table-sk) .sk { display: block; border-radius: 999px; background: linear-gradient(100deg, #f1eee7 30%, #f9f8f4 50%, #f1eee7 70%) 0 0 / 250% 100%; animation: rl-skel-sheen 1.6s ease-in-out infinite; }
.rl-gc-group.is-sk .sk-art { width: 58px; height: 34px; border-radius: 7px; }
.rl-gc-group.is-sk .sk-line, .rl-gc-table-sk .sk-line { height: 11px; width: 70%; }
.rl-gc-group.is-sk .rl-gc-group-name { gap: 8px; }
.rl-gc-group.is-sk .sk-line.is-short, .rl-gc-table-sk .sk-line.is-short { width: 42%; }
.rl-gc-group.is-sk .sk-bar { height: 6px; }
.rl-gc-table-sk { display: flex; flex-direction: column; }
.rl-gc-table-sk-row { display: grid; grid-template-columns: 58px minmax(0, 1.4fr) minmax(0, 1fr) 64px; gap: 16px; align-items: center; padding: 12px 10px; border-bottom: 1px solid #f1ede5; }
.rl-gc-table-sk .sk-mini { width: 58px; height: 34px; border-radius: 7px; }
.rl-gc-table-sk .sk-pill { width: 64px; height: 22px; }
@keyframes rl-skel-sheen { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* Asking again: a thin bar slides along the top (only if it takes a
   moment), and the last answer stays, faded, until the new one lands. */
.rl-gc-busy { display: block; position: relative; height: 2px; margin: -2px 0 0; border-radius: 2px; overflow: hidden; opacity: 0; transition: opacity 0.2s ease; }
.rl-gc-busy.is-on { opacity: 1; transition-delay: 0.15s; }
.rl-gc-busy.is-on::after { content: ""; position: absolute; top: 0; bottom: 0; width: 34%; border-radius: 2px; background: #2f8f6d; animation: rl-gc-busy 1.1s cubic-bezier(0.45, 0, 0.25, 1) infinite; }
@keyframes rl-gc-busy { from { left: -34%; } to { left: 100%; } }
.rl-gc-results { transition: opacity 0.2s ease; }
.rl-gc-results.is-stale { opacity: 0.5; pointer-events: none; transition-delay: 0.12s; }
.rl-gc-results .rl-gc-tr { animation: rl-gc-row-in 0.22s ease both; }
@keyframes rl-gc-row-in { from { opacity: 0; } }

/* The group window: its summary, filters and search, then its cards. */
.rl-gc-group-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 16px; margin-bottom: 14px; border: 1px solid #eeeae2; border-radius: 14px; background: #fbfaf7; }
.rl-gc-group-summary > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rl-gc-group-body .rl-gc-toolbar > .rl-gc-search { min-width: 200px; }
.rl-gc-group-list { position: relative; min-height: 160px; }
.rl-gc-group-list .rl-gc-table-wrap { overflow-x: visible; }

@media (prefers-reduced-motion: reduce) {
  .rl-gc-runcard, body.pro-mode .rl-gc-group:not(#rl), .rl-gc-results .rl-gc-tr { animation: none; }
  :is(.rl-gc-group.is-sk, .rl-gc-table-sk) .sk { animation: none; }
  .rl-gc-busy.is-on::after { animation-duration: 2.4s; }
}
@media (max-width: 1000px) {
  .rl-gc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .rl-gc-stat { padding: 12px 14px; }
  .rl-gc-stat > strong { font-size: 21px; }
  .rl-gc-stat > p { white-space: normal; }
  .rl-gc-toolbar > .rl-gc-search, .rl-gc-group-body .rl-gc-toolbar > .rl-gc-search { margin-left: 0; min-width: 0; width: 100%; order: -1; }
  .rl-gc-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 2px; }
  .rl-gc-chips::-webkit-scrollbar { display: none; }
  .rl-gc-chip { flex: none; }
  .rl-gc-group-summary { grid-template-columns: minmax(0, 1fr); }
  .rl-gc-group-summary > .rl-gc-stack { display: none; }
  .rl-gc-table-sk-row { grid-template-columns: 58px minmax(0, 1fr) 64px; }
  .rl-gc-table-sk-row > .sk-line.is-short { display: none; }
}
