/*
 * WooCommerce globals — loaded on every Woo page (shop, product, cart, checkout, account).
 * WooCommerce's own stylesheets are dequeued (inc/assets.php), so this file gives the markup
 * Woo prints the design system's look: notices, form rows, buttons, select2, quantity inputs,
 * tables, the AJAX "processing" overlay. Generic rules sit inside :where() so page CSS
 * (shop.css, product.css, account.css, cart.css, checkout.css) overrides them with a single class.
 *
 * Also the shared cart/checkout page frame (woocommerce/cart/pitstop-frame.php).
 */

/* ── Cart / checkout frame (Cart.dc.html head) ────────────────────────── */
.ps-woopage__wrap { padding-top: 52px; padding-bottom: 64px; }
.ps-woopage__crumb {
	margin-bottom: 14px;
	font-family: var(--ps-font-cond); font-weight: 700; font-size: 13px; letter-spacing: 0.2em;
	text-transform: uppercase; color: var(--ps-go-deep);
}
.ps-woopage__crumb a, .ps-woopage__crumb a:hover { color: var(--ps-muted); }
/* The design's h1 keeps the UA bold on a 400-only face (Chrome synthesises it): 700 reproduces it. */
.ps-woopage__title {
	margin: 0 0 30px;
	font-family: var(--ps-font-display); font-weight: 700; font-size: 48px; line-height: 0.96; letter-spacing: -0.025em;
	color: var(--ps-ink);
}

/* ── Notices (design status boxes: OK green · warning red · info blue) ─── */
:where(.woocommerce-notices-wrapper):empty { display: none; }
:where(.woocommerce-notices-wrapper, .woocommerce-NoticeGroup) { display: grid; gap: 10px; margin-bottom: 20px; }
:where(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice) {
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
	margin: 0; padding: 12px 16px; list-style: none;
	border: 1px solid var(--ps-verify); border-radius: var(--ps-radius-sm);
	background: var(--ps-verify-tint); color: var(--ps-ink-3);
	font-family: var(--ps-font-body); font-size: 15px; line-height: 1.5;
}
:where(.woocommerce-message, .woocommerce-notice--success) { border-color: var(--ps-go); background: var(--ps-go-tint); color: var(--ps-go-deep); }
:where(.woocommerce-error, .woocommerce-notice--error) { display: block; border-color: var(--ps-relief); background: var(--ps-relief-tint); color: var(--ps-relief-deep); }
:where(.woocommerce-error) li { margin: 0; }
:where(.woocommerce-error) li + li { margin-top: 6px; }
:where(.woocommerce-message, .woocommerce-info, .woocommerce-error):focus { outline: none; } /* Woo focuses notices for screen readers */
:where(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice) a:not(.button) {
	color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
}
:where(.woocommerce-info) a:not(.button) { color: var(--ps-verify-deep); text-decoration: none; }
:where(.woocommerce-message, .woocommerce-info, .woocommerce-error) .button.button {
	order: 2; margin-left: auto; padding: 0; background: none; border: 0;
	font-family: var(--ps-font-cond); font-weight: 700; font-size: 13px; letter-spacing: 0.12em;
	text-transform: uppercase; color: var(--ps-ink); text-decoration: none; white-space: nowrap;
}
:where(.woocommerce-message, .woocommerce-info, .woocommerce-error) .button.button:hover { color: var(--ps-go-deep); background: none; }
:where(.woocommerce-message, .woocommerce-info, .woocommerce-error) strong { font-weight: 700; }

/* ── Buttons Woo prints (.button) → .ps-btn--dark look ─────────────────── */
:where(.woocommerce, .woocommerce-page) :where(a.button, button.button, input.button, #respond input#submit):not(.ps-btn) {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 13px 22px; border: 0; border-radius: var(--ps-radius-sm);
	background: var(--ps-ink); color: var(--ps-cream);
	font-family: var(--ps-font-cond); font-weight: 700; font-size: 15px; line-height: 1.2;
	letter-spacing: 0.12em; text-transform: uppercase; text-align: center; text-decoration: none;
	cursor: pointer; white-space: nowrap;
	transition: background-color var(--ps-ease), color var(--ps-ease);
}
:where(.woocommerce, .woocommerce-page) :where(a.button, button.button, input.button):not(.ps-btn):hover { background: var(--ps-go); color: var(--ps-cream); }
:where(.woocommerce, .woocommerce-page) :where(.button:disabled, .button.disabled, .button[disabled]):not(.ps-btn) { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ── Form rows (Account.dc.html fields: condensed label + 2px ink input) ── */
:where(.woocommerce) .form-row { margin: 0 0 16px; padding: 0; }
:where(.woocommerce) .form-row > label,
:where(.woocommerce) .form-row > .woocommerce-input-wrapper > label {
	display: block; margin-bottom: 6px;
	font-family: var(--ps-font-cond); font-weight: 600; font-size: 13px; letter-spacing: 0.1em;
	text-transform: uppercase; color: var(--ps-muted); line-height: 1.2;
}
:where(.woocommerce) .form-row .required { color: var(--ps-relief-deep); text-decoration: none; border: 0; font-weight: 700; }
:where(.woocommerce) .form-row .optional { font-family: var(--ps-font-body); font-weight: 400; font-size: 12px; letter-spacing: 0; text-transform: none; }
:where(.woocommerce) .woocommerce-input-wrapper { display: block; position: relative; }
:where(.woocommerce) .form-row :is(.input-text, select, textarea) {
	display: block; width: 100%; margin: 0;
	padding: 11px 13px; border: 2px solid var(--ps-ink); border-radius: var(--ps-radius-sm);
	background: var(--ps-paper); color: var(--ps-ink);
	font-family: var(--ps-font-body); font-size: 16px; line-height: 1.2; outline: none;
	transition: border-color var(--ps-ease), box-shadow var(--ps-ease);
}
:where(.woocommerce) .form-row textarea { min-height: 96px; line-height: 1.5; resize: vertical; }
:where(.woocommerce) .form-row select { appearance: auto; }
:where(.woocommerce) .form-row :is(.input-text, select, textarea):focus { border-color: var(--ps-go); box-shadow: 0 0 0 3px var(--ps-go-tint); }
:where(.woocommerce) :is(.input-text, select, textarea)::placeholder { color: #9A9E93; opacity: 1; }
:where(.woocommerce) .form-row.woocommerce-invalid :is(.input-text, select, textarea),
:where(.woocommerce) .form-row.woocommerce-invalid .select2-selection { border-color: var(--ps-relief); }
:where(.woocommerce) .form-row.woocommerce-invalid > label { color: var(--ps-relief-deep); }
:where(.woocommerce) .checkout-inline-error-message,
:where(.woocommerce) .form-row .woocommerce-error { margin: 6px 0 0; padding: 0; border: 0; background: none; font-size: 13px; color: var(--ps-relief-deep); }
:where(.woocommerce) .form-row .description { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--ps-muted); }

/* Checkboxes + radios: the design's 16px green-accent box, sentence-case label */
:where(.woocommerce) :is(input[type="checkbox"], input[type="radio"]) { width: 16px; height: 16px; margin: 0; accent-color: var(--ps-go); flex: none; cursor: pointer; }
:where(.woocommerce) .form-row label.checkbox,
:where(.woocommerce) .form-row .woocommerce-form__label-for-checkbox,
:where(.woocommerce) label.woocommerce-form__label-for-checkbox {
	display: inline-flex; align-items: center; gap: 8px; margin: 0;
	font-family: var(--ps-font-body); font-weight: 400; font-size: 14px; letter-spacing: 0;
	text-transform: none; color: var(--ps-text); cursor: pointer;
}

/* Floated half rows outside a field grid (account forms); grid wrappers below ignore floats. */
:where(.woocommerce) .form-row-first { float: left; width: calc(50% - 8px); }
:where(.woocommerce) .form-row-last { float: right; width: calc(50% - 8px); }
:where(.woocommerce) .form-row-wide { clear: both; }
:where(.woocommerce) .clear { clear: both; }
:where(.woocommerce) :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-address-fields__field-wrapper) {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px;
}
:where(.woocommerce) :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-address-fields__field-wrapper) > .form-row { grid-column: 1 / -1; width: auto; float: none; }
:where(.woocommerce) :is(.woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-address-fields__field-wrapper) > :is(.form-row-first, .form-row-last) { grid-column: auto; }

/* Password field: show/hide toggle (Woo's icon font is not loaded) */
:where(.woocommerce) .password-input { display: block; position: relative; }
:where(.woocommerce) .password-input .input-text { padding-right: 46px; }
:where(.woocommerce) .show-password-input {
	position: absolute; top: 50%; right: 8px; width: 32px; height: 32px; margin-top: -16px; padding: 0;
	border: 0; background: transparent center / 20px no-repeat; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236D7167' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
:where(.woocommerce) .show-password-input.display-password {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111210' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}
:where(.woocommerce-password-strength) {
	margin-top: 8px; padding: 6px 10px; border-radius: var(--ps-radius-sm);
	font-family: var(--ps-font-cond); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
	background: var(--ps-line-2); color: var(--ps-text);
}
:where(.woocommerce-password-strength.short, .woocommerce-password-strength.bad) { background: var(--ps-relief-tint); color: var(--ps-relief-deep); }
:where(.woocommerce-password-strength.good) { background: var(--ps-core-tint); color: var(--ps-core-text); }
:where(.woocommerce-password-strength.strong) { background: var(--ps-go-tint); color: var(--ps-go-deep); }
:where(.woocommerce-password-hint) { display: block; margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--ps-muted); }

/* ── select2 / selectWoo (country + state pickers) as the design's input ─ */
.select2-container .select2-selection--single { height: 46px; border: 2px solid var(--ps-ink); border-radius: var(--ps-radius-sm); background: var(--ps-paper); }
.select2-container--default .select2-selection--single .select2-selection__rendered {
	padding: 0 38px 0 13px; line-height: 42px; color: var(--ps-ink);
	font-family: var(--ps-font-body); font-size: 16px;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: #9A9E93; }
.select2-container--default .select2-selection--single .select2-selection__arrow { top: 0; right: 10px; height: 42px; width: 20px; }
.select2-container--default .select2-selection--single .select2-selection__arrow b { border-color: var(--ps-ink) transparent transparent; border-width: 6px 5px 0; margin-left: -5px; margin-top: -3px; }
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b { border-color: transparent transparent var(--ps-ink); border-width: 0 5px 6px; }
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single { border-color: var(--ps-go); box-shadow: 0 0 0 3px var(--ps-go-tint); }
.select2-dropdown { border: 2px solid var(--ps-ink); border-radius: var(--ps-radius-sm); background: var(--ps-paper); font-family: var(--ps-font-body); color: var(--ps-ink); z-index: 1060; }
.select2-container--open .select2-dropdown--below { margin-top: -2px; border-top-left-radius: 0; border-top-right-radius: 0; }
.select2-container--open .select2-dropdown--above { margin-top: 2px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.select2-container--default .select2-search--dropdown .select2-search__field { padding: 8px 10px; border: 2px solid var(--ps-line); border-radius: var(--ps-radius-sm); font: inherit; font-size: 15px; outline: none; }
.select2-container--default .select2-search--dropdown .select2-search__field:focus { border-color: var(--ps-ink); }
.select2-results__option { padding: 8px 13px; font-size: 15px; line-height: 1.3; }
.select2-container--default .select2-results__option[aria-selected="true"],
.select2-container--default .select2-results__option[data-selected="true"] { background: var(--ps-line-2); color: var(--ps-ink); }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] { background: var(--ps-ink); color: var(--ps-cream); }

/* ── Quantity input Woo prints (.quantity .qty) ────────────────────────── */
:where(.woocommerce) .quantity { display: inline-flex; }
:where(.woocommerce) .quantity .qty {
	width: 64px; padding: 9px 6px; border: 2px solid var(--ps-ink); border-radius: var(--ps-radius-sm);
	background: var(--ps-paper); color: var(--ps-ink); text-align: center;
	font-family: var(--ps-font-cond); font-weight: 700; font-size: 17px; line-height: 1.2;
	font-variant-numeric: tabular-nums; outline: none;
}
:where(.woocommerce) .quantity .qty:focus { border-color: var(--ps-go); box-shadow: 0 0 0 3px var(--ps-go-tint); }

/* ── Tables Woo prints (order details, account orders, order-pay) ─────── */
:where(.woocommerce table.shop_table) { width: 100%; border-collapse: collapse; border-spacing: 0; background: var(--ps-paper); border: 1px solid var(--ps-line); border-radius: var(--ps-radius); font-size: 15px; line-height: 1.45; }
:where(.woocommerce table.shop_table) :is(th, td) { padding: 12px 18px; border-bottom: 1px solid var(--ps-line-2); text-align: left; vertical-align: top; }
:where(.woocommerce table.shop_table) thead th {
	background: var(--ps-ink); color: var(--ps-cream);
	font-family: var(--ps-font-cond); font-weight: 700; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
}
:where(.woocommerce table.shop_table) tfoot th {
	font-family: var(--ps-font-cond); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ps-muted);
}
:where(.woocommerce table.shop_table) tfoot tr:last-child :is(th, td) { border-bottom: 0; }
:where(.woocommerce table.shop_table) :is(td.product-total, td.woocommerce-table__product-total, tfoot td) { text-align: right; font-family: var(--ps-font-cond); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
:where(.woocommerce table.shop_table) a { color: var(--ps-ink); font-weight: 700; }
:where(.woocommerce table.shop_table) a:hover { color: var(--ps-go-deep); }
:where(.woocommerce) .wc-item-meta { margin: 6px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--ps-muted); }
:where(.woocommerce) .wc-item-meta li { display: flex; gap: 4px; }
:where(.woocommerce) .wc-item-meta p { margin: 0; }
:where(.woocommerce) dl.variation { display: grid; grid-template-columns: auto 1fr; gap: 2px 6px; margin: 6px 0 0; font-size: 13px; color: var(--ps-muted); }
:where(.woocommerce) dl.variation :is(dt, dd) { margin: 0; }
:where(.woocommerce) dl.variation p { margin: 0; }
:where(.woocommerce) address { font-style: normal; line-height: 1.6; color: var(--ps-text); }

/* ── AJAX "processing" overlay (jQuery blockUI) ────────────────────────── */
.blockUI.blockOverlay { cursor: wait; }
.blockUI.blockOverlay::before {
	content: ""; position: absolute; top: 50%; left: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px;
	border: 3px solid var(--ps-line); border-top-color: var(--ps-ink); border-radius: 50%;
	animation: ps-woo-spin 0.7s linear infinite;
}
@keyframes ps-woo-spin { to { transform: rotate(360deg); } }

@media (max-width: 767px) {
	.ps-woopage__wrap { padding-top: 30px; padding-bottom: 44px; }
	.ps-woopage__crumb { font-size: 12px; margin-bottom: 10px; }
	.ps-woopage__title { font-size: 36px; margin-bottom: 22px; }
	:where(.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice) { font-size: 14px; padding: 11px 14px; }
	:where(.woocommerce) .form-row-first, :where(.woocommerce) .form-row-last { float: none; width: auto; }
	:where(.woocommerce table.shop_table) :is(th, td) { padding: 10px 12px; }
}
