/* Gift vouchers: purchase page + the voucher field injected into the
   sign-up form. All classes are prefixed acnb-gv; values follow the site's
   existing form styling (rounded inputs, pill buttons, #24170f / #b78755). */

/* ------------------------- sign-up: voucher field ------------------------- */

.acnb-gv-field {
  margin: 22px 0 6px;
  padding: 16px;
  border: 1px dashed rgba(183, 135, 85, 0.55);
  border-radius: 16px;
  background: rgba(251, 249, 246, 0.9);
}

.acnb-gv-field > label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: rgba(36, 23, 15, 0.86);
}

.acnb-gv-field__row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: stretch;
}

.acnb-gv-field__row input[type="text"] {
  flex: 1 1 200px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(36, 23, 15, 0.16);
  border-radius: 14px;
  background: #fff;
  color: #24170f;
  font: inherit;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.acnb-gv-apply {
  flex: 0 0 auto;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ac-button-bg, #24170f);
  color: var(--ac-button-text, #fff);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.acnb-gv-apply:disabled {
  opacity: 0.6;
  cursor: default;
}

.acnb-gv-status {
  margin: 10px 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  min-height: 1em;
}

.acnb-gv-status.is-ok {
  color: #1e8e3e;
}

.acnb-gv-status.is-error {
  color: #c0392b;
}

.acnb-gv-help {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: rgba(36, 23, 15, 0.6);
}

/* --------------------------- gift purchase page --------------------------- */

.acnb-gv-card h2 {
  margin-top: 6px;
}

.acnb-gv-form input[type="text"],
.acnb-gv-form input[type="email"],
.acnb-gv-form textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid rgba(36, 23, 15, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #24170f;
  font: inherit;
}

.acnb-gv-form textarea {
  min-height: 96px;
  resize: vertical;
}

.acnb-gv-form .ac-field > label,
.acnb-gv-amounts > label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: rgba(36, 23, 15, 0.86);
}

.acnb-gv-optional {
  font-weight: 400;
  color: rgba(36, 23, 15, 0.55);
}

.acnb-gv-hint {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: rgba(36, 23, 15, 0.6);
}

.acnb-gv-charcount {
  text-align: right;
}

/* Amount picker: radio cards. */

.acnb-gv-amounts {
  margin-bottom: 18px;
}

.acnb-gv-amounts__grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.acnb-gv-amount {
  position: relative;
  flex: 1 1 120px;
  max-width: 200px;
  cursor: pointer;
}

.acnb-gv-amount input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.acnb-gv-amount__price {
  display: block;
  padding: 18px 12px;
  border: 2px solid rgba(36, 23, 15, 0.16);
  border-radius: 16px;
  background: #fff;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #24170f;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.acnb-gv-amount input[type="radio"]:checked + .acnb-gv-amount__price,
.acnb-gv-amount.is-selected .acnb-gv-amount__price {
  border-color: #b78755;
  background: #fbf6ef;
  box-shadow: 0 0 0 1px #b78755;
}

.acnb-gv-amount input[type="radio"]:focus-visible + .acnb-gv-amount__price {
  outline: 2px solid #b78755;
  outline-offset: 2px;
}

.acnb-gv-form .ac-form-actions button {
  cursor: pointer;
}

/* Success view: the code box (also reused in emails via inline styles). */

.acnb-gv-codebox {
  margin: 22px 0;
  padding: 22px;
  border: 2px dashed #b78755;
  border-radius: 16px;
  background: #fbf9f6;
  text-align: center;
}

.acnb-gv-codebox__label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #6b5744;
}

.acnb-gv-codebox__code {
  display: block;
  margin-top: 6px;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #24170f;
  word-break: break-all;
}

@media (max-width: 580px) {
  .acnb-gv-field__row input[type="text"] {
    flex-basis: 100%;
  }

  .acnb-gv-apply {
    width: 100%;
  }

  .acnb-gv-amount {
    max-width: none;
  }
}
