/* Gift cards: the purchase page (/{lang}/regalo) and the card itself (/{lang}/regalo/tarjeta).
   Loaded after reservar.css, which has the booking page's steps, summary and order blocks these pages reuse. */

/* ---------- Purchase page ---------- */

.gc-group {
  grid-column: 1 / -1;
  margin: 8px 0 -4px;
  padding-top: 12px;
  border-top: 1px solid var(--mantel-line);
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.gc-group:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.gc-counter {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.gc-conditions {
  grid-column: 1 / -1;
}

.gc-conditions .gc-label {
  margin: 0 0 6px;
  color: var(--ink-2);
}

.gc-conditions ul {
  margin: 0;
  padding-left: 20px;
}

.gc-conditions li + li {
  margin-top: 4px;
}

.gc-lines + .bk-total {
  margin-top: 12px;
}

/* ---------- The card ---------- */

.gc-card {
  position: relative;
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(22px, 5vw, 38px);
  overflow: hidden;
  border: 1px solid rgba(242, 194, 48, .55);
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(242, 194, 48, .16), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(200, 16, 46, .22), transparent 60%),
    linear-gradient(160deg, #2A1212 0%, #1E0D0D 100%);
  color: var(--text-primary);
  box-shadow: var(--shadow-2), inset 0 0 0 5px rgba(30, 13, 13, .9), inset 0 0 0 6px rgba(242, 194, 48, .3);
}

.gc-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gc-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.gc-brand {
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--accent);
}

.gc-for {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 8px 0 0;
}

.gc-for span {
  font-family: var(--font-label);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.gc-for strong {
  font-family: var(--font-display);
  font-size: clamp(30px, 8vw, 42px);
  font-weight: 400;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.gc-from {
  margin: 0;
  font-size: 16px;
  color: var(--text-secondary);
}

.gc-message {
  margin: 4px 0 0;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--accent);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.gc-label {
  margin: 0 0 4px;
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.gc-contents {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.gc-contents ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 17px;
  font-weight: 600;
}

.gc-contents li + li {
  margin-top: 2px;
}

.gc-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.gc-codebox {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gc-code {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: clamp(34px, 10vw, 50px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: .08em;
  color: var(--accent);
  font-variant-numeric: lining-nums tabular-nums;
}

.gc-code span + span {
  position: relative;
}

.gc-code span + span::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 52%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: .7;
}

.gc-code-pending {
  font-size: 17px;
  font-style: italic;
  color: var(--text-secondary);
}

.gc-qr {
  flex: none;
  margin: 0;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
}

.gc-qr img {
  display: block;
  width: 120px;
  height: 120px;
  image-rendering: pixelated;
}

.gc-valid {
  margin: 0;
  font-weight: 600;
  color: var(--accent);
}

.gc-fine {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* A card that cannot be used any more (redeemed, expired, cancelled): the same card, dimmed, its code struck out. */
.gc-card.is-void {
  filter: grayscale(.85);
  opacity: .7;
}

.gc-card.is-void .gc-code {
  text-decoration: line-through;
}

.gc-card.is-pending .gc-for strong {
  opacity: .9;
}

.gc-totals {
  max-width: 640px;
  margin: 0 auto;
}

.gc-card ~ .od-pay-box,
.gc-card ~ .od-actions {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 520px) {
  .gc-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .gc-qr {
    align-self: center;
  }
}

/* ---------- Printing: just the card, light, on paper ---------- */

@media print {
  @page {
    margin: 14mm;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .rs-skip,
  .rs-header,
  .rs-footer,
  .bk-bar,
  .od-hero,
  .gc-noprint,
  .od-info,
  .od-actions,
  .rs-actions,
  .bk-banner {
    display: none !important;
  }

  .bk-main {
    display: block !important;
    max-width: none !important;
    padding: 0 !important;
  }

  .gc-card {
    max-width: none;
    break-inside: avoid;
    border: 2px solid #b8860b;
    border-radius: 18px;
    background: #fff !important;
    color: #1E0D0D !important;
    box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 6px #b8860b !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    filter: none;
    opacity: 1;
  }

  .gc-brand,
  .gc-code,
  .gc-valid {
    color: #7A5C00 !important;
  }

  .gc-for span,
  .gc-from,
  .gc-label,
  .gc-fine {
    color: #3b2a26 !important;
  }

  .gc-message {
    border-left-color: #b8860b;
  }

  .gc-contents,
  .gc-foot {
    border-top-color: #d8c7b4;
  }

  .gc-logo {
    background: #1E0D0D;
    border-radius: 50%;
    padding: 4px;
    box-sizing: content-box;
  }
}
