/* ══════════════════════════════════════════════
   BEACHFRONT MASSAGE THERAPY
   Gift Card Purchase Widget — gift-card-widget.css
   Styled to match the booking widget aesthetic
   ══════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────── */
.bmt-gc-widget {
  --gc-red:        #cc2222;
  --gc-red-dark:   #aa1a1a;
  --gc-red-light:  #e03333;
  --gc-cream:      #FEF1E4;
  --gc-white:      #ffffff;
  --gc-dark:       #1C0D0A;
  --gc-mid:        #4a3520;
  --gc-soft:       #8a7060;
  --gc-muted:      #9CA3AF;
  --gc-border:     #e8d8c8;
  --gc-success:    #2d7a4a;
  --gc-success-bg: #f0faf4;
  --gc-error:      #cc2222;
  --gc-radius:     12px;
  font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  color: var(--gc-dark);
  max-width: 620px;
  margin: 0 auto;

  /* Cream container — matches booking widget outer shell */
  background: var(--gc-cream);
  border-radius: var(--gc-radius);
  box-shadow: 0 4px 32px rgba(26,16,8,0.10);
  overflow: hidden;
}

/* ── Progress bar — white tab strip at top ───── */
.bmt-gc-progress {
  display: flex;
  background: var(--gc-white);
  border-bottom: 1px solid var(--gc-border);
  gap: 0;
  padding: 0;
  margin: 0;
}

/* Connector lines hidden — tabs are flush */
.bmt-gc-progress-line {
  display: none;
}

.bmt-gc-progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 13px 6px 11px;
  position: relative;
  opacity: 1;
  cursor: default;
}

/* Red underline on active tab — matches booking widget */
.bmt-gc-progress-step.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gc-red);
  border-radius: 2px 2px 0 0;
}

/* Numbered circle */
.bmt-gc-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e0d0c4;
  color: var(--gc-muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, color 0.25s;
  line-height: 1;
}

.bmt-gc-progress-step.active .bmt-gc-step-num {
  background: var(--gc-red);
  color: white;
}

.bmt-gc-progress-step.done .bmt-gc-step-num {
  background: var(--gc-red);
  color: white;
  opacity: 0.65;
}

/* Step label */
.bmt-gc-step-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gc-muted);
  text-align: center;
  white-space: nowrap;
}

.bmt-gc-progress-step.active .bmt-gc-step-label { color: var(--gc-red); }
.bmt-gc-progress-step.done  .bmt-gc-step-label  { color: var(--gc-red); opacity: 0.6; }

/* ── Step panels — padded content area ──────── */
.bmt-gc-step {
  display: none;
  padding: 26px 24px 32px;
  animation: bmt-gc-fadein 0.25s ease;
}

.bmt-gc-step.active { display: block; }

@keyframes bmt-gc-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Lato (not serif) to match booking widget */
.bmt-gc-step-title {
  font-family: 'Lato', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--gc-dark);
  margin: 0 0 5px;
}

.bmt-gc-step-sub {
  font-size: 14px;
  color: var(--gc-soft);
  margin: 0 0 22px;
  line-height: 1.5;
}

/* ── Amount grid — 4-up, matching duration cards ─ */
.bmt-gc-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

/* Each amount button styled like a duration card */
.bmt-gc-amount-btn {
  padding: 16px 8px 14px !important;
  border: 1.5px solid var(--gc-border) !important;
  border-radius: var(--gc-radius) !important;
  background: var(--gc-white) !important;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  color: var(--gc-dark) !important;
}

.bmt-gc-amount-btn:hover {
  border-color: var(--gc-red) !important;
  background: var(--gc-white) !important;
  box-shadow: 0 2px 10px rgba(204,34,34,0.10) !important;
  transform: translateY(-1px);
  opacity: 1 !important;
}

.bmt-gc-amount-btn.selected {
  border-color: var(--gc-red) !important;
  background: var(--gc-white) !important;
  box-shadow: 0 2px 10px rgba(204,34,34,0.15) !important;
  opacity: 1 !important;
}

/* Amount value */
.bmt-gc-amt-value {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--gc-dark);
  line-height: 1.2;
  transition: color 0.15s;
}

.bmt-gc-amount-btn.selected .bmt-gc-amt-value {
  color: var(--gc-red);
}

/* ── Custom amount row ───────────────────────── */
.bmt-gc-custom-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.bmt-gc-custom-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gc-soft);
  white-space: nowrap;
}

.bmt-gc-custom-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 180px;
  border: 1.5px solid var(--gc-border);
  border-radius: 8px;
  background: var(--gc-white);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bmt-gc-custom-wrap:focus-within {
  border-color: var(--gc-red);
  box-shadow: 0 0 0 3px rgba(204,34,34,0.08);
}

.bmt-gc-prefix {
  padding: 11px 4px 11px 12px;
  color: var(--gc-soft);
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
  user-select: none;
}

.bmt-gc-custom-input {
  flex: 1;
  padding: 11px 10px 11px 2px;
  border: none;
  border-radius: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--gc-dark);
  background: transparent;
  outline: none;
  font-family: inherit;
  -webkit-appearance: none;
  min-width: 0;
}

.bmt-gc-custom-input:focus {
  border-color: transparent;
  box-shadow: none;
}

/* ── Occasion grid ───────────────────────────── */
.bmt-gc-occasion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

.bmt-gc-occasion-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  border: 1.5px solid var(--gc-border);
  border-radius: var(--gc-radius);
  background: var(--gc-white);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  text-align: center;
}

.bmt-gc-occasion-btn:hover {
  border-color: var(--gc-red);
  box-shadow: 0 2px 8px rgba(204,34,34,0.08);
  transform: translateY(-1px);
}

.bmt-gc-occasion-btn.selected {
  border-color: var(--gc-red);
  background: var(--gc-white);
  box-shadow: 0 2px 8px rgba(204,34,34,0.12);
}

.bmt-gc-occ-emoji { font-size: 20px; line-height: 1; display: block; }

.bmt-gc-occ-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gc-mid);
  line-height: 1.2;
}

.bmt-gc-occasion-btn.selected .bmt-gc-occ-label { color: var(--gc-red); }

/* ── Delivery toggle ─────────────────────────── */
.bmt-gc-delivery-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.bmt-gc-delivery-btn {
  padding: 9px 16px;
  border: 1.5px solid var(--gc-border);
  border-radius: 20px;
  background: var(--gc-white);
  color: var(--gc-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}

.bmt-gc-delivery-btn:hover  { border-color: var(--gc-red); color: var(--gc-red); }
.bmt-gc-delivery-btn.selected { border-color: var(--gc-red); background: var(--gc-red); color: white; }

/* ── Date hint ───────────────────────────────── */
.bmt-gc-date-hint {
  font-size: 12px;
  color: var(--gc-soft);
  margin-top: 5px;
  line-height: 1.4;
}

/* ── Form fields ─────────────────────────────── */
.bmt-gc-field { margin-bottom: 18px; }

.bmt-gc-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gc-soft);
  margin-bottom: 7px;
}

.bmt-gc-req { color: var(--gc-red); }
.bmt-gc-opt { color: #9a8070; font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 11px; }

.bmt-gc-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gc-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  color: var(--gc-dark);
  background: var(--gc-white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.bmt-gc-input:focus {
  border-color: var(--gc-red);
  box-shadow: 0 0 0 3px rgba(204,34,34,0.08);
}

.bmt-gc-textarea { resize: vertical; min-height: 80px; }

.bmt-gc-field.invalid .bmt-gc-input {
  border-color: var(--gc-error);
  box-shadow: 0 0 0 3px rgba(204,34,34,0.08);
}

/* ── Error messages ──────────────────────────── */
.bmt-gc-field-error { font-size: 12px; color: var(--gc-error); margin-top: 5px; line-height: 1.4; }
.bmt-gc-field-error.hidden { display: none; }

/* ── Payment failure banner (BPOINT return) ── */
.bmt-gc-error-banner {
  margin: 0;
  padding: 14px 18px;
  background: #fff0f0;
  border-bottom: 2px solid var(--gc-error);
  color: #7a0000;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}
.bmt-gc-error-banner.hidden { display: none; }

/* ── Buttons — matching booking widget style, !important to beat WC ─── */
.bmt-gc-widget .bmt-gc-btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none !important;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  margin-top: 12px;
}

.bmt-gc-widget .bmt-gc-btn-primary {
  background: #cc2222 !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(204,34,34,0.25) !important;
  border: none !important;
}

.bmt-gc-widget .bmt-gc-btn-primary:hover {
  background: #e03333 !important;
  box-shadow: 0 4px 12px rgba(204,34,34,0.30) !important;
}

.bmt-gc-widget .bmt-gc-btn-primary:active {
  transform: scale(0.99);
  background: #aa1a1a !important;
}

.bmt-gc-widget .bmt-gc-btn-secondary {
  background: transparent !important;
  color: var(--gc-soft) !important;
  border: 1.5px solid var(--gc-border) !important;
  box-shadow: none !important;
}

.bmt-gc-widget .bmt-gc-btn-secondary:hover {
  border-color: #cc2222 !important;
  color: #cc2222 !important;
}

.bmt-gc-widget .bmt-gc-btn-outline {
  background: transparent !important;
  color: #cc2222 !important;
  border: 1.5px solid rgba(204,34,34,0.4) !important;
  box-shadow: none !important;
}

.bmt-gc-widget .bmt-gc-btn-outline:hover {
  background: #cc2222 !important;
  color: white !important;
  border-color: #cc2222 !important;
}

.bmt-gc-widget .bmt-gc-btn:disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Spinner ─────────────────────────────────── */
.bmt-gc-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: bmt-gc-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

.bmt-gc-spinner.hidden { display: none; }
@keyframes bmt-gc-spin { to { transform: rotate(360deg); } }

/* ── Order summary (step 4) ──────────────────── */
.bmt-gc-summary {
  background: var(--gc-white);
  border: 1.5px solid var(--gc-border);
  border-radius: var(--gc-radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.bmt-gc-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 4px 0;
  color: var(--gc-mid);
}

.bmt-gc-summary-row:first-child { font-weight: 700; font-size: 15px; color: var(--gc-dark); }

/* ── Payment options ─────────────────────────── */
.bmt-gc-payment-option {
  border: 1.5px solid var(--gc-border);
  border-radius: var(--gc-radius);
  padding: 16px;
  margin-bottom: 4px;
  background: var(--gc-white);
}

.bmt-gc-payment-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--gc-dark);
  margin-bottom: 6px;
}

.bmt-gc-payment-note { font-size: 12px; color: var(--gc-soft); margin: 0 0 12px; line-height: 1.5; }

.bmt-gc-payment-divider {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gc-border);
  margin: 12px 0;
  position: relative;
}

.bmt-gc-payment-divider::before,
.bmt-gc-payment-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 24px);
  height: 1px;
  background: var(--gc-border);
}

.bmt-gc-payment-divider::before { left: 0; }
.bmt-gc-payment-divider::after  { right: 0; }

.bmt-gc-paypal-loading { font-size: 12px; color: var(--gc-soft); text-align: center; padding: 10px; }

/* ── Success / error screens ─────────────────── */
.bmt-gc-result { text-align: center; padding: 32px 24px; }

.bmt-gc-success-icon,
.bmt-gc-error-icon {
  margin: 0 auto 20px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bmt-gc-success-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--gc-dark);
  margin: 0 0 12px;
  font-family: 'Lato', sans-serif;
}

.bmt-gc-error-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--gc-error);
  margin: 0 0 12px;
  font-family: 'Lato', sans-serif;
}

.bmt-gc-success-msg,
.bmt-gc-error-msg { font-size: 15px; color: var(--gc-mid); line-height: 1.6; margin: 0 0 12px; }

.bmt-gc-success-sub { font-size: 13px; color: var(--gc-soft); margin: 0 0 16px; }
.bmt-gc-success-sub a { color: var(--gc-red); text-decoration: none; font-weight: 700; }

#bmt-gc-step-success { text-align: center; padding: 24px 0; }

/* ══════════════════════════════════════════════
   CART STEP (step 3)
   ══════════════════════════════════════════════ */

.bmt-gc-cart-items { margin-bottom: 16px; }

.bmt-gc-cart-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: var(--gc-white);
  border: 1.5px solid var(--gc-border);
  border-radius: var(--gc-radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  animation: bmt-gc-fadein 0.2s ease;
}

.bmt-gc-ci-main { flex: 1; min-width: 0; }

.bmt-gc-ci-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.bmt-gc-ci-amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--gc-dark);
  line-height: 1;
  white-space: nowrap;
}

.bmt-gc-ci-occasion {
  font-size: 11px;
  font-weight: 700;
  color: var(--gc-soft);
  background: var(--gc-cream);
  border: 1px solid var(--gc-border);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
}

.bmt-gc-ci-meta-row { display: flex; flex-wrap: wrap; gap: 6px; }

.bmt-gc-ci-meta { font-size: 12px; color: var(--gc-soft); line-height: 1.4; }

.bmt-gc-ci-notes {
  font-style: italic;
  display: block;
  margin-top: 2px;
  color: var(--gc-mid);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.bmt-gc-ci-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--gc-border);
  background: transparent;
  color: var(--gc-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  margin-top: 2px;
  font-family: inherit;
  padding: 0;
  line-height: 1;
}

.bmt-gc-ci-remove:hover { border-color: var(--gc-error); background: var(--gc-error); color: white; }

.bmt-gc-cart-footer {
  border-top: 1px solid var(--gc-border);
  padding: 14px 4px 6px;
  margin-bottom: 6px;
}

.bmt-gc-cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.bmt-gc-cart-total-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gc-soft);
}

.bmt-gc-cart-total-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--gc-dark);
}

.bmt-gc-checkout-count {
  font-size: 12px;
  opacity: 0.8;
  letter-spacing: 0.04em;
  font-weight: 400;
}

/* ── Floating cart button ────────────────────── */
.bmt-gc-float-cart {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e52020;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: bmt-gc-fadein 0.2s ease;
}

.bmt-gc-float-cart:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0,0,0,.28);
}

.bmt-gc-float-cart:active {
  transform: scale(0.96);
}

/* Item count badge */
.bmt-gc-float-count {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  color: #e52020;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1.5px solid #e52020;
}

/* ── Mobile ──────────────────────────────────── */
@media (max-width: 560px) {
  .bmt-gc-amounts { grid-template-columns: repeat(3, 1fr); }
  .bmt-gc-step { padding: 20px 16px 28px; }
  .bmt-gc-custom-row { flex-direction: column; align-items: flex-start; }
  .bmt-gc-custom-wrap { max-width: 100%; width: 100%; }
  .bmt-gc-step-label { font-size: 8px; }
  .bmt-gc-occasion-grid { grid-template-columns: repeat(4, 1fr); }
  .bmt-gc-delivery-options { flex-direction: column; }
  .bmt-gc-delivery-btn { text-align: center; }
}

@media (max-width: 380px) {
  .bmt-gc-step-label { display: none; }
  .bmt-gc-step-num { width: 24px; height: 24px; font-size: 11px; }
}
