.gp-gv-fields {
  --gp-gv-blue: #030280;
  --gp-gv-soft: #f5f5f0;
  --gp-gv-line: #d8d8cf;
  color: var(--gp-gv-blue);
  font-family: Poppins, sans-serif;
  width: 100%;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--gp-gv-line);
  background: #fff;
  box-sizing: border-box;
}

/*
 * The GP Clinic theme renders variation controls in a horizontal flex row.
 * Voucher details are substantially taller than a regular quantity field, so
 * keep the voucher form and submit button in their own full-width rows.
 */
body.single-product.woocommerce div.product form.variations_form.cart .variations_button {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 16px !important;
}

body.single-product.woocommerce div.product form.variations_form.cart .variations_button > .quantity {
  display: none !important;
}

body.single-product.woocommerce div.product form.variations_form.cart .variations_button > .single_add_to_cart_button.button.alt {
  display: inline-flex !important;
  width: 100% !important;
  min-height: 56px !important;
  height: auto !important;
  max-height: none !important;
  flex: none !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: start !important;
  padding: 16px 28px !important;
  line-height: 1.25 !important;
  white-space: nowrap;
  box-sizing: border-box;
}

.gp-gv-fields__title {
  margin: 0 0 20px;
  color: var(--gp-gv-blue);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: .02em;
}

.gp-gv-fields label,
.gp-gv-choice-group legend {
  color: var(--gp-gv-blue);
  font-size: 14px;
}

.gp-gv-field {
  width: 100%;
  max-width: 100%;
  margin: 0 0 18px !important;
  box-sizing: border-box;
}

.gp-gv-field > label {
  display: block;
  margin-bottom: 7px;
  font-weight: 500;
}

.gp-gv-field input[type="text"],
.gp-gv-field input[type="email"],
.gp-gv-field input[type="date"],
.gp-gv-field input[type="number"],
.gp-gv-field textarea,
.woocommerce div.product form.cart .variations select:not(.gp-variation-native-select) {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--gp-gv-blue);
  border-radius: 0;
  background: #fff;
  color: var(--gp-gv-blue);
  font: inherit;
  box-shadow: none;
  box-sizing: border-box;
}

.woocommerce div.product form.cart .variations select:not(.gp-variation-native-select) {
  min-width: 220px;
  padding-right: 42px;
  border-color: var(--gp-gv-blue, #030280);
  border-radius: 0;
  background-color: #fff;
  color: var(--gp-gv-blue, #030280);
  font-family: Poppins, sans-serif;
}

.gp-gv-field textarea {
  min-height: 108px;
  resize: vertical;
}

.gp-gv-field input:focus,
.gp-gv-field textarea:focus {
  outline: 2px solid rgba(3, 2, 128, .18);
  outline-offset: 2px;
}

.gp-gv-custom-amount-panel {
  width: 100%;
  max-width: 100%;
  padding: 18px;
  margin: 0 0 20px;
  border: 1px solid var(--gp-gv-blue);
  background: var(--gp-gv-soft);
  box-sizing: border-box;
}

.gp-gv-custom-amount-panel[hidden] {
  display: none !important;
}

.gp-gv-custom-amount-panel .gp-gv-field {
  margin-bottom: 0 !important;
}

.gp-gv-custom-amount-control {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* The custom variation's saved price is only a WooCommerce purchase anchor. */
body.single-product.woocommerce div.product form.variations_form.gp-gv-custom-amount-active .woocommerce-variation-price {
  display: none !important;
}

.gp-gv-custom-amount-control input[type="number"] {
  padding-right: 54px;
  font-size: 18px;
  font-weight: 500;
}

.gp-gv-custom-amount-currency {
  position: absolute;
  top: 50%;
  right: 16px;
  color: var(--gp-gv-blue);
  font-size: 18px;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.gp-gv-custom-amount-panel small {
  display: block;
  margin-top: 7px;
  color: #5c5c72;
  font-size: 12px;
  line-height: 1.45;
}

.gp-gv-choice-group {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.gp-gv-choice-group legend {
  margin-bottom: 9px;
  font-weight: 500;
}

.gp-gv-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gp-gv-choice {
  position: relative;
  display: flex;
  min-height: 76px;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--gp-gv-line);
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}

.gp-gv-choice:hover,
.gp-gv-choice.is-selected {
  border-color: var(--gp-gv-blue);
  background: var(--gp-gv-soft);
}

.gp-gv-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gp-gv-choice__mark {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  border: 1px solid var(--gp-gv-blue);
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 4px #fff;
}

.gp-gv-choice.is-selected .gp-gv-choice__mark {
  background: var(--gp-gv-blue);
}

.gp-gv-choice strong,
.gp-gv-choice small {
  display: block;
}

.gp-gv-choice strong {
  font-size: 14px;
  font-weight: 500;
}

.gp-gv-choice small {
  margin-top: 4px;
  color: #5c5c72;
  font-size: 12px;
  line-height: 1.4;
}

.gp-gv-recipient-panel,
.gp-gv-date-panel {
  width: 100%;
  max-width: 100%;
  padding: 18px;
  margin: 0 0 20px;
  background: var(--gp-gv-soft);
  box-sizing: border-box;
}

.gp-gv-recipient-panel[hidden],
.gp-gv-date-panel[hidden] {
  display: none !important;
}

.gp-gv-character-count {
  display: block;
  margin-top: 5px;
  color: #6c6c78;
  text-align: right;
  font-size: 11px;
}

.gp-gv-terms {
  padding-top: 16px;
  border-top: 1px solid var(--gp-gv-line);
  color: #555568;
  font-size: 12px;
  line-height: 1.6;
}

.gp-gv-terms p:last-child {
  margin-bottom: 0;
}

.gp-gv-order-summary {
  color: #4b4b5b;
}

/* Keep voucher metadata on aligned label/value rows in cart and checkout. */
.woocommerce-cart .product-name dl.variation,
.woocommerce-checkout-review-order-table .product-name dl.variation {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 4px;
  align-items: start;
}

.woocommerce-cart .product-name dl.variation dt,
.woocommerce-cart .product-name dl.variation dd,
.woocommerce-checkout-review-order-table .product-name dl.variation dt,
.woocommerce-checkout-review-order-table .product-name dl.variation dd {
  float: none !important;
  clear: none !important;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
}

.woocommerce-cart .product-name dl.variation dd p,
.woocommerce-checkout-review-order-table .product-name dl.variation dd p {
  display: inline;
  margin: 0 !important;
  padding: 0 !important;
}

@media (max-width: 620px) {
  .gp-gv-fields {
    padding: 18px 14px;
  }

  .gp-gv-choice-grid {
    grid-template-columns: 1fr;
  }
}

/* Purchaser-owned My Account voucher views. */
.gp-gv-account {
  --gp-gv-account-blue: #030280;
  --gp-gv-account-line: #e6e6dc;
  --gp-gv-account-soft: #f7f7f2;
  color: #28283a;
}

.gp-gv-account__intro,
.gp-gv-account-detail__usage {
  max-width: 720px;
  color: #555568;
}

.gp-gv-account__table-wrap {
  width: 100%;
  overflow-x: auto;
}

.gp-gv-account-table {
  width: 100%;
  margin: 22px 0 0;
  border-collapse: collapse;
  border: 1px solid var(--gp-gv-account-line);
  background: #fff;
}

.gp-gv-account-table th,
.gp-gv-account-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--gp-gv-account-line);
  text-align: left;
  vertical-align: middle;
}

.gp-gv-account-table th {
  color: var(--gp-gv-account-blue);
  background: var(--gp-gv-account-soft);
  font-size: 13px;
  font-weight: 600;
}

.gp-gv-account-table tbody tr:last-child td {
  border-bottom: 0;
}

.gp-gv-account__code {
  color: var(--gp-gv-account-blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: .035em;
  overflow-wrap: anywhere;
}

.gp-gv-account-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ececf7;
  color: var(--gp-gv-account-blue);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.gp-gv-account-status--redeemed,
.gp-gv-account-status--expired,
.gp-gv-account-status--cancelled {
  background: #f0f0ed;
  color: #5e5e68;
}

.gp-gv-account-status--review,
.gp-gv-account-status--pending_order,
.gp-gv-account-status--not_started {
  background: #fff4d8;
  color: #73530b;
}

.gp-gv-account__back {
  margin: 0 0 18px;
}

.gp-gv-account-detail__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 22px 0;
  padding: 1px;
  background: var(--gp-gv-account-line);
}

.gp-gv-account-detail__facts > div {
  min-width: 0;
  padding: 16px;
  background: #fff;
}

.gp-gv-account-detail__facts dt {
  margin-bottom: 6px;
  color: #686878;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.gp-gv-account-detail__facts dd {
  margin: 0;
  color: #28283a;
}

.gp-gv-account-detail__usage {
  padding: 14px 16px;
  border-left: 3px solid var(--gp-gv-account-blue);
  background: var(--gp-gv-account-soft);
}

.gp-gv-account-history {
  margin-top: 28px;
}

.gp-gv-account-history__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--gp-gv-account-line);
}

.gp-gv-account-history__list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--gp-gv-account-line);
}

@media (max-width: 760px) {
  .gp-gv-account__table-wrap {
    overflow: visible;
  }

  .gp-gv-account-table,
  .gp-gv-account-table tbody,
  .gp-gv-account-table tr,
  .gp-gv-account-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .gp-gv-account-table {
    border: 0;
    background: transparent;
  }

  .gp-gv-account-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .gp-gv-account-table tr {
    margin-bottom: 16px;
    border: 1px solid var(--gp-gv-account-line);
    background: #fff;
  }

  .gp-gv-account-table td {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    text-align: right;
  }

  .gp-gv-account-table td::before {
    content: attr(data-title);
    flex: 0 0 42%;
    color: #686878;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
  }

  .gp-gv-account-table tbody tr:last-child td {
    border-bottom: 1px solid var(--gp-gv-account-line);
  }

  .gp-gv-account-table tbody tr:last-child td:last-child,
  .gp-gv-account-table td:last-child {
    border-bottom: 0;
  }

  .gp-gv-account-detail__facts {
    grid-template-columns: 1fr;
  }

  .gp-gv-account-history__list li {
    flex-direction: column;
    gap: 5px;
  }
}
