/* TSD QA fixes for WooCommerce pages (cart, checkout, account, product). Loaded only on shop pages, after woo.css. */

/* Cart: "Proceed to checkout" printed its label at the top of a tall box. Centre it, full width, easy to tap. */
.woocommerce .wc-proceed-to-checkout .checkout-button,
.woocommerce-cart .wc-proceed-to-checkout a.button { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; min-height: 3.5rem; padding: .9rem 1.25rem; line-height: 1.2; text-align: center; }

/* Checkout: billing form on the left, order summary + Place order on the right (the layout shoppers expect),
   one column on tablets/phones. */
@media (min-width: 960px) {
	.woocommerce-checkout form.checkout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 3rem; align-items: start; }
	.woocommerce-checkout form.checkout #customer_details { grid-column: 1; grid-row: 1 / span 3; }
	.woocommerce-checkout form.checkout #customer_details .col-1,
	.woocommerce-checkout form.checkout #customer_details .col-2 { float: none; width: 100%; }
	.woocommerce-checkout form.checkout #order_review_heading { grid-column: 2; grid-row: 1; margin-top: 0; }
	.woocommerce-checkout form.checkout #order_review { grid-column: 2; grid-row: 2; position: sticky; top: 6rem; }
	.woocommerce-checkout form.checkout .woocommerce-NoticeGroup { grid-column: 1 / -1; }
}
.woocommerce-checkout #place_order { width: 100%; min-height: 3.5rem; font-size: 1rem; letter-spacing: .06em; }
.woocommerce-checkout #payment { border-radius: 10px; }
.woocommerce-checkout .woocommerce-info { border-radius: 8px; }
.woocommerce-checkout .form-row label { margin-bottom: .25rem; display: inline-block; }
.woocommerce-checkout .form-row .required { color: #b30000; text-decoration: none; }

/* Cart on phones: stack the table rows so nothing scrolls sideways. */
@media (max-width: 640px) {
	.woocommerce-cart table.shop_table_responsive tr td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
	.woocommerce-cart table.shop_table_responsive tr td::before { float: none; font-weight: 700; }
	.woocommerce-cart .coupon { display: flex; flex-wrap: wrap; gap: .5rem; }
	.woocommerce-cart .coupon input.input-text { flex: 1 1 10rem; }
}

/* Product page: sale badge must never sit on top of the title or breadcrumb. */
.tt-main--product .onsale { z-index: 2; }
.woocommerce-checkout #customer_details h3:first-child, .woocommerce-checkout #order_review_heading { margin-top: 0; }

/* 1.0.21: "choose an option first" state of the Add to cart button. It used to fade to 45% opacity (text contrast 2.8:1).
   Same grayed look, but with a solid pale gold and dark text (8:1). */
.single_add_to_cart_button:disabled, .single_add_to_cart_button.disabled, .woocommerce-variation-add-to-cart-disabled .single_add_to_cart_button,
.single_add_to_cart_button.wc-variation-is-unavailable, form.cart:not(.variations_form) .single_add_to_cart_button.disabled {
	opacity: 1 !important; background: #f0dfae !important; border-color: #e1cd92 !important; color: #4a3a10 !important; cursor: not-allowed;
}


/* ===== 1.0.25 ===== */

/* Cart / checkout / account: the title banner was a full-screen photo that pushed the cart table below the fold. Compact bar instead. */
body.woocommerce-cart .tt-hero, body.woocommerce-checkout .tt-hero, body.woocommerce-account .tt-hero { min-height: 0; padding: clamp(1.5rem, 4vw, 2.5rem) 0; }
body.woocommerce-cart .tt-hero .tt-hero__title, body.woocommerce-checkout .tt-hero .tt-hero__title, body.woocommerce-account .tt-hero .tt-hero__title { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: 0; }
body.woocommerce-cart .tt-hero::before, body.woocommerce-checkout .tt-hero::before, body.woocommerce-account .tt-hero::before { background: rgba(0,0,0,.55); opacity: 1; }

/* Order summary / cart item details ("Register: 3 Hours", "Gun Rental: 1 Rental"): one tidy "Label: value" line each, no browser-default indent. */
.woocommerce dl.variation, .woocommerce .wc-item-meta { margin: .4rem 0 0; padding: 0; font-size: .85rem; line-height: 1.45; list-style: none; }
.woocommerce dl.variation dt, .woocommerce .wc-item-meta .wc-item-meta-label { float: none; display: inline; clear: none; margin: 0 .3em 0 0; padding: 0; font-weight: 700; }
.woocommerce dl.variation dd { display: inline; margin: 0; padding: 0; }
.woocommerce dl.variation dd::after { content: ""; display: block; }
.woocommerce dl.variation dd p, .woocommerce .wc-item-meta li p { display: inline; margin: 0; padding: 0; }
.woocommerce .wc-item-meta li { margin: 0; padding: 0; }

/* Product gallery: the first photo shows right away. WooCommerce hides the gallery (opacity 0) until its slider script has run, which left a blank box on first paint. */
.woocommerce div.product div.images.woocommerce-product-gallery, .woocommerce-product-gallery { opacity: 1 !important; transition: none; }

/* Product short description (Registration / Waitlist / Cancel policy notes) as a tidy list. */
.tt-product__short ul, .tt-product__short ol { margin: .6rem 0 1rem; padding-left: 1.25rem; }
.tt-product__short li { margin: .4rem 0; line-height: 1.55; }
.tt-product__short p { margin: 0 0 .7rem; }
