/* F2H Shop — checkout-only chrome + quantity stepper styling.
   Hides site navigation/footer so only the checkout remains. Theme-agnostic;
   adjust selectors per theme if needed (tuned for Storefront). */

.site-header,
.storefront-handheld-footer-bar,
.site-footer,
#secondary,
.woocommerce-breadcrumb,
nav.woocommerce-MyAccount-navigation {
  display: none !important;
}

.site-content,
#primary,
.content-area {
  width: 100% !important;
  max-width: 720px;
  margin: 0 auto !important;
  float: none !important;
  padding-top: 2rem;
}

/* Dezenter „Zurück zu Fairway 2 Hotel"-Link oben im Checkout. */
.f2h-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s ease;
}

.f2h-back-link:hover,
.f2h-back-link:focus {
  color: #111827;
  text-decoration: underline;
}

/* Kostenloser Versand: die Versand-Kostenzeile in der Bestellübersicht NIE
   anzeigen (Adressfelder bleiben erhalten — die werden für den Postversand
   weiterhin benötigt). Klassen-basiert, damit es unabhängig vom Element
   (tr/div) und Container greift — Standard-WooCommerce + Germanized. */
.woocommerce-shipping-totals,
.woocommerce-shipping-totals.shipping,
tr.shipping {
  display: none !important;
}

/* Order review: right-align the amounts (product totals, subtotal, shipping,
   tax, grand total) while labels stay left. Covers standard WooCommerce +
   Germanized rows; !important to override the theme's table alignment. */
.woocommerce-checkout-review-order-table .product-total,
.woocommerce-checkout-review-order-table tfoot td,
.woocommerce-checkout-review-order-table tfoot .amount,
.woocommerce-checkout-review-order-table td.product-total .amount {
  text-align: right !important;
}

/* Quantity stepper */
.f2h-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

.f2h-qty__label {
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
}

/* Price with discount (old → new + savings hint) */
.f2h-qty__info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

/* Alter Preis über dem neuen (per <br> getrennt), kompakter Zeilenabstand —
   kein großer Abstand zwischen Original- und reduziertem Preis. */
.f2h-qty__price {
  line-height: 1.2;
}

.f2h-qty__price--old {
  text-decoration: line-through;
  opacity: 0.55;
}

.f2h-qty__price--new {
  font-weight: 700;
}

.f2h-qty__sum {
  display: block;
  font-size: 0.9em;
  margin-top: 0.15rem;
}

.f2h-qty__control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.f2h-qty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
  color: inherit;
}

.f2h-qty__btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.f2h-qty__input {
  width: 3.5rem;
  height: 2.25rem;
  text-align: center;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Gift recipient email field */
.f2h-gift-email {
  margin: 1rem 0;
}

/* Checkbox + H3-Text als Flex-Zeile: Checkbox links, Text rechts in eigener
   Spalte. Bei langem Text bricht er innerhalb seiner Spalte um — NICHT mehr
   unter die Checkbox. */
.f2h-gift-email__toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  margin: 0;
}

.f2h-gift-email__cb {
  flex: 0 0 auto;
  margin-top: 0.3rem;
}

.f2h-gift-email__heading {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.f2h-gift-email__field {
  display: none;
}

/* Reveal the recipient field when the checkbox is ticked (progressive; JS-free
   via :has where supported). */
.f2h-gift-email:has(.f2h-gift-email__toggle input:checked) .f2h-gift-email__field {
  display: block;
}

/* ── Brand colour ───────────────────────────────────────────────────────────
   Force the exact F2H app red (#AA1945) on the checkout accents, instead of the
   theme's slightly different red. Scoped to the checkout; !important to win over
   the theme/WooCommerce/Germanized defaults. If an element still shows the wrong
   red, add its selector here. */
:root {
  --f2h-red: #AA1945;
  /* The theme/Germanized brand variable resolves to a slightly different red
     (#9D1B32 = rgb(158,27,50)) and drives the notice border (4px solid var(--brand))
     and links. Re-point it to the exact app red so every var(--brand) accent
     matches in one shot. !important is valid on custom-property declarations and
     ensures we win over the theme's own --brand regardless of stylesheet order. */
  --brand: #AA1945 !important;
}

/* Primary / order button ("Jetzt kaufen") */
.woocommerce #place_order,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce-checkout button.button {
  background-color: var(--f2h-red) !important;
  border-color: var(--f2h-red) !important;
  color: #fff !important;
}
.woocommerce #place_order:hover,
.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce-checkout button.button:hover {
  background-color: var(--f2h-red) !important;
  border-color: var(--f2h-red) !important;
}

/* Checkboxes & radios — native control tint (terms, gift toggle, …) */
.woocommerce-checkout input[type="checkbox"],
.woocommerce-checkout input[type="radio"],
form.checkout input[type="checkbox"],
form.checkout input[type="radio"],
.f2h-gift-email__cb {
  accent-color: var(--f2h-red);
}

/* Notice / hint boxes ("Hinweisfeld") — the theme draws a 4px accent border via
   var(--brand); re-pointing --brand above fixes it, these are explicit fallbacks
   in case a more specific theme rule wins. Covers the left accent and top accent. */
.woocommerce-info,
.woocommerce-message,
.woocommerce-error,
.woocommerce-noreviews {
  border-color: var(--f2h-red) !important;
  border-top-color: var(--f2h-red) !important;
  border-left-color: var(--f2h-red) !important;
}
.woocommerce-info::before,
.woocommerce-message::before {
  color: var(--f2h-red) !important;
}

/* Links — match the app red (theme links use var(--brand), now re-pointed; this
   is an explicit fallback for any link not driven by the variable). */
.woocommerce-checkout a:not(.button):not(.button.alt),
.woocommerce-info a,
.woocommerce-message a {
  color: var(--f2h-red);
}

/* Field focus accent */
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.f2h-qty__input:focus {
  border-color: var(--f2h-red) !important;
  outline-color: var(--f2h-red);
}

/* Terms-consent link */
.woocommerce-terms-and-conditions-wrapper a,
.woocommerce-privacy-policy-text a {
  color: var(--f2h-red);
}
