/* Gift voucher / carried deposit at checkout.
   Lifted from Design's vouchers.css (design_handoff_vouchers_credit), trimmed to the redemption
   rules only. Every custom property here already resolves inside the booking module's scope; the
   fallbacks are for the book checkout, which is a modal on a WooCommerce page and does not
   inherit the same palette. */

/* Specificity note: the theme styles buttons with [type="button"], an attribute selector,
   which ties with a class and wins on load order. Every interactive rule below is
   parent-qualified so it wins outright rather than relying on !important. */
.gv-redeem {
  border: 1.5px solid var(--border, #e3d9c8);
  border-radius: 16px;
  background: var(--cream, #fff);
  padding: 14px 16px;
}
.gv-redeem.open { background: var(--paper, #fffdf8); }

.gv-redeem .gv-redeem-toggle {
  display: flex; align-items: center; gap: 9px;
  background: none; border: none; font-family: inherit;
  font-size: 14.5px; font-weight: 700;
  color: var(--ink-soft, #5f574b);
  cursor: pointer; padding: 0; width: 100%; text-align: left;
  -webkit-tap-highlight-color: transparent;
}
/* David, 2026-08-22: tapping this toggle left it wearing a bright pink background that never
   cleared. Root cause is the SAME theme collision the note above already names, just the state
   nobody had covered: hello-elementor's reset.css carries
   `[type=button]:focus,[type=button]:hover,button:focus,button:hover{background-color:#c36}`,
   an attribute selector that TIES this rule's specificity (two classes each) and is decided by
   load order alone - which the theme was winning. Two classes plus the pseudo-class below beats
   the theme's selector outright, so the fix holds regardless of enqueue order from now on. A
   keyboard user still gets a visible ring via :focus-visible; a tap or a mouse click does not. */
.gv-redeem .gv-redeem-toggle:hover,
.gv-redeem .gv-redeem-toggle:focus,
.gv-redeem .gv-redeem-toggle:active {
  background: none;
  color: var(--orange-dark, #a2551d);
}
.gv-redeem .gv-redeem-toggle:focus-visible {
  outline: 2px solid var(--orange, #c46a26);
  outline-offset: 3px;
  border-radius: 4px;
}
.gv-redeem .gv-redeem-toggle:focus:not(:focus-visible) { outline: none; }
.gv-redeem .gv-redeem-toggle .chev { margin-left: auto; color: var(--ink-faint, #948a79); }

/* The signed-in member's own credit, offered as one tap above the code box (David's ruling,
   2026-08-22): they should not have to find and type a code for money that is already theirs.
   The code box below is unchanged and stays for a gift voucher, or anyone else. */
.gv-mine {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--orange, #c46a26);
  background: var(--orange-tint, #fbeee0);
  border-radius: 16px; padding: 14px 16px; margin-bottom: 12px;
}
.gv-mine .ico {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: #fff; color: var(--orange-dark, #a2551d);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 15px; line-height: 1;
}
.gv-mine-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gv-mine-text .amt { font-size: 14.5px; font-weight: 900; color: var(--ink, #2c2823); }
.gv-mine-text .sub { font-size: 12.5px; color: var(--ink-soft, #5f574b); margin-top: 2px; }
.gv-mine .gv-btn.sm { padding: 10px 18px; font-size: 13.5px; min-height: 40px; flex: none; }

.gv-redeem-form { display: flex; gap: 10px; margin-top: 13px; flex-wrap: wrap; }
.gv-redeem .gv-redeem-form input {
  flex: 1; min-width: 0;
  border: 1.5px solid var(--border, #e3d9c8);
  border-radius: 13px; padding: 13px 15px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px; letter-spacing: .09em; text-transform: uppercase;
  background: #fff; color: var(--ink, #2c2823);
}
.gv-redeem .gv-redeem-form input:focus { outline: none; border-color: var(--orange, #c46a26); }
.gv-redeem .gv-redeem-form input.bad { border-color: var(--full, #a33); }

.gv-redeem-hint { font-size: 12.5px; color: var(--ink-faint, #948a79); margin-top: 9px; line-height: 1.5; }

.gv-redeem-err {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--full-tint, #fbeaea);
  border: 1.5px solid var(--full, #a33);
  border-radius: 14px; padding: 13px 15px; margin-top: 12px;
  font-size: 13.5px; line-height: 1.55; color: var(--full, #a33);
}
.gv-redeem-err .ico {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--full, #a33); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px; line-height: 1;
}

.gv-applied {
  border: 1.5px solid var(--ok, #4f7a4f);
  background: var(--ok-tint, #eef5ee);
  border-radius: 16px; padding: 16px 18px;
}
.gv-applied .top { display: flex; align-items: flex-start; gap: 12px; }
.gv-applied .ico {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: #fff; color: var(--ok, #4f7a4f);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 16px; line-height: 1;
}
.gv-applied .t { font-size: 15.5px; font-weight: 900; color: var(--ok, #4f7a4f); line-height: 1.35; }
.gv-applied .s {
  font-size: 13px; color: var(--ink-soft, #5f574b); margin-top: 3px; line-height: 1.5;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.gv-applied button.rm {
  margin-left: auto; background: none; border: none; font-family: inherit;
  font-size: 13px; font-weight: 800; color: var(--ink-soft, #5f574b);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer; padding: 0; flex: none;
  -webkit-tap-highlight-color: transparent;
}
.gv-applied button.rm:hover,
.gv-applied button.rm:focus,
.gv-applied button.rm:active { color: var(--ink, #2c2823); background: none; }
.gv-applied button.rm:focus-visible { outline: 2px solid var(--orange, #c46a26); outline-offset: 2px; }
.gv-applied button.rm:focus:not(:focus-visible) { outline: none; }
.gv-applied .left {
  margin-top: 13px; border-top: 1px solid var(--border, #e3d9c8); padding-top: 12px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.gv-applied .left .k { font-size: 14px; font-weight: 800; color: var(--ink, #2c2823); }
.gv-applied .left .v { font-size: 28px; font-weight: 900; letter-spacing: -.025em; color: var(--ink, #2c2823); }
.gv-applied.nothing .left .v { color: var(--ok, #4f7a4f); }

.gv-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700; letter-spacing: .08em;
  font-variant-ligatures: none; white-space: nowrap;
}

.gv-redeem .gv-btn, .gv-applied .gv-btn, .gv-mine .gv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px; padding: 13px 22px;
  font-weight: 800; font-size: 15px; cursor: pointer; min-height: 48px;
  font-family: inherit; transition: background .12s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.gv-redeem .gv-btn.dark, .gv-mine .gv-btn.dark { background: var(--ink, #2c2823); color: #fff; }
.gv-redeem .gv-btn:disabled, .gv-mine .gv-btn:disabled { opacity: .5; cursor: not-allowed; }

@media (min-width: 560px) { .gv-redeem-form { flex-wrap: nowrap; } }
