/* Tool Box LLC — conservative Booqable reservation / checkout polish.
   Presentation only: no payment, pricing, availability, or reservation logic. */

:root {
  --toolbox-checkout-orange: #f47a22;
  --toolbox-checkout-orange-dark: #df6818;
  --toolbox-checkout-text: #17191c;
  --toolbox-checkout-muted: #69707a;
  --toolbox-checkout-border: #dedfe2;
  --toolbox-checkout-soft: #f7f7f5;
}

/* Keep Booqable-generated form controls visually aligned with the public site. */
.booqable-component input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([hidden]):not([aria-hidden="true"]),
.booqable-component select:not([hidden]):not([aria-hidden="true"]),
.booqable-component textarea:not([hidden]):not([aria-hidden="true"]) {
  box-sizing: border-box !important;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px !important;
  border: 1px solid var(--toolbox-checkout-border) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--toolbox-checkout-text) !important;
  box-shadow: none !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.booqable-component textarea {
  min-height: 112px;
  resize: vertical;
}

.booqable-component input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([hidden]):not([aria-hidden="true"]):focus,
.booqable-component select:not([hidden]):not([aria-hidden="true"]):focus,
.booqable-component textarea:not([hidden]):not([aria-hidden="true"]):focus {
  border-color: var(--toolbox-checkout-orange) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(244, 122, 34, .11) !important;
}

/* Never let hidden/conditional Booqable controls become visible ghost rows. */
.booqable-component input[type="hidden"],
.booqable-component input[hidden],
.booqable-component select[hidden],
.booqable-component textarea[hidden],
.booqable-component input[aria-hidden="true"],
.booqable-component select[aria-hidden="true"],
.booqable-component textarea[aria-hidden="true"] {
  display: none !important;
  min-height: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Checkout/cart containers: flatten Booqable's heavier visual treatment without
   depending on one exact generated class name. */
.booqable-component :is(
  [class*="checkout"],
  [class*="cart-content"],
  [class*="cart-panel"],
  [class*="order-summary"],
  [class*="customer-details"]
) {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.booqable-component :is(
  [class*="checkout-section"],
  [class*="checkout-card"],
  [class*="order-summary"],
  [class*="customer-details"]
) {
  border-color: #e5e7ea !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.booqable-component :is(
  [class*="checkout"],
  [class*="cart-content"],
  [class*="order-summary"]
) label {
  color: #33383d !important;
  font-weight: 700 !important;
}

/* Primary Booqable reservation actions. Existing JS continues to decide when
   Continue Reservation / Complete Reservation are enabled. */
.booqable-component .bq-button,
.booqable-component button.bq-button {
  min-height: 48px;
  border-radius: 8px !important;
  box-shadow: none !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-weight: 750 !important;
}

.booqable-component .bq-button:not(:disabled) {
  background: var(--toolbox-checkout-orange) !important;
  border-color: var(--toolbox-checkout-orange) !important;
  color: #fff !important;
}

.booqable-component .bq-button:not(:disabled):hover {
  background: var(--toolbox-checkout-orange-dark) !important;
  border-color: var(--toolbox-checkout-orange-dark) !important;
}

.booqable-component .bq-button:disabled,
.booqable-component button:disabled {
  opacity: .52 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* ATH Móvil button: size/spacing only. Initialization and callbacks remain owned
   by ATH/Booqable and the existing checkout safety patch. */
#buttonATHMBP {
  width: 100% !important;
  min-height: 50px !important;
  margin-top: 8px !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}

#buttonATHMBP[aria-disabled="true"] {
  opacity: .55 !important;
}

/* Keep terms / consent rows easy to tap without altering checked state. */
.booqable-component input[type="checkbox"],
.booqable-component input[type="radio"] {
  accent-color: var(--toolbox-checkout-orange);
}

.booqable-component input[type="checkbox"] + label,
.booqable-component label:has(input[type="checkbox"]) {
  line-height: 1.45;
}

/* Keep totals legible and avoid excessive card styling. */
.booqable-component :is([class*="total"], [class*="summary"]) {
  box-shadow: none !important;
}

.booqable-component :is([class*="grand-total"], [class*="total-price"]) {
  color: var(--toolbox-checkout-text) !important;
  font-weight: 800 !important;
}

/* Final checkout CTA is presentation-only. Booqable remains the authority for
   whether the action is enabled and what happens when it is submitted. */
.booqable-component [data-toolbox-final-checkout-action="true"] {
  min-height: 54px !important;
  margin-top: 12px !important;
  border-radius: 10px !important;
  font-size: 1.02rem !important;
  font-weight: 800 !important;
  letter-spacing: .01em;
}

.booqable-component [data-toolbox-final-checkout-action="true"]:not(:disabled) {
  box-shadow: 0 8px 18px rgba(244, 122, 34, .2) !important;
}

.booqable-component [data-toolbox-final-checkout-action="true"]:disabled {
  box-shadow: none !important;
}

@media (max-width: 768px) {
  .booqable-component input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([hidden]):not([aria-hidden="true"]),
  .booqable-component select:not([hidden]):not([aria-hidden="true"]),
  .booqable-component textarea:not([hidden]):not([aria-hidden="true"]) {
    font-size: 16px !important;
  }

  .booqable-component .bq-button,
  .booqable-component button.bq-button,
  #buttonATHMBP {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 50px !important;
  }

  .booqable-component [data-toolbox-final-checkout-action="true"] {
    min-height: 52px !important;
    margin-top: 10px !important;
  }

  .booqable-component :is(
    [class*="checkout"],
    [class*="cart-content"],
    [class*="cart-panel"],
    [class*="order-summary"]
  ) {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .booqable-component :is(
    [class*="checkout-section"],
    [class*="checkout-card"],
    [class*="order-summary"]
  ) {
    border-radius: 8px !important;
  }

  .booqable-component {
    overflow-wrap: anywhere;
  }
}
