/* Indoor Climb South Coast — Enquiry mode styles */

/* -----------------------------------------------------------------------
 * Belt-and-braces: hide every native WooCommerce add-to-cart affordance
 * on non-gift-card products, regardless of which renderer produced it.
 *
 * WooCommerce adds `product-type-<slug>` to the product wrapper (the <li>
 * in the loop and the outer <div> on single product pages). Gift cards get
 * `product-type-pw-gift-card`; our child theme also mirrors that class
 * onto <body> on single product pages (see icsc-enquiry-mode.php).
 *
 * Our own .icsc-enquiry-button / .icsc-enquiry-cta UI is explicitly allowed
 * through so it always renders.
 * -------------------------------------------------------------------- */

.product:not(.product-type-pw-gift-card) .add_to_cart_button {
	display: none !important;
}

body.single-product:not(.product-type-pw-gift-card) .product > .summary form.cart:not(.icsc-enquiry-variations),
body.single-product:not(.product-type-pw-gift-card) .product > .summary .single_add_to_cart_button {
	display: none !important;
}

/* -----------------------------------------------------------------------
 * WC Blocks ("All Products" / "Product Collection") render client-side and
 * paint a skeleton "Add to cart" button before the Store API response
 * arrives. Hide that placeholder so customers never see the flash; the
 * real button replaces it with the correct (filtered) text once data
 * loads.
 * -------------------------------------------------------------------- */

.wc-block-components-product-button__button--placeholder,
.wp-block-button.wc-block-components-product-button .wp-block-button__link.wc-block-components-product-button__button--placeholder {
	visibility: hidden !important;
}

/* During the very first paint the React node may not even exist yet, so
 * reserve the button height to prevent the layout shift when it arrives. */
.wc-block-components-product-button {
	min-height: 44px;
}


.icsc-enquiry-button,
.icsc-enquiry-submit-btn {
	display: inline-block;
	padding: 12px 22px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 4px;
	cursor: pointer;
}

.icsc-enquiry-button--loop {
	margin-top: 6px;
}

.icsc-enquiry-cta {
	margin: 20px 0 30px;
}

/* Locked-in height shared between the qty input and the Enquire button.
 * Salient's .button class sets its own padding/height, so we override with
 * an explicit height + !important to guarantee they match. */
.icsc-enquiry-cta {
	--icsc-cta-height: 48px;
}

.icsc-enquiry-cta .icsc-enquiry-row {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 14px;
}

.icsc-enquiry-cta .icsc-enquiry-qty {
	width: 90px;
	height: var(--icsc-cta-height) !important;
	box-sizing: border-box !important;
	line-height: 1 !important;
	font-size: 1rem !important;
}

.icsc-enquiry-cta .icsc-enquiry-button--single {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	height: var(--icsc-cta-height) !important;
	min-height: var(--icsc-cta-height) !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	line-height: 1 !important;
	font-size: 1rem !important;
	box-sizing: border-box !important;
}

.icsc-enquiry-form,
.icsc-forminator-enquiry {
	max-width: 880px;
}

/* -----------------------------------------------------------------------
 * Forminator order enquiry form — typography, field panels, submit button.
 * -------------------------------------------------------------------- */

.icsc-forminator-enquiry {
	--icsc-form-accent: #ff8c1b;
	--icsc-form-btn-bg: #313233;
	--icsc-form-field-bg: #f3f4f6;
	--icsc-form-field-border: #e5e7eb;
}

.icsc-forminator-enquiry__heading {
	margin: 0 0 20px;
	font-size: clamp(1.5rem, 2.5vw, 1.875rem);
	font-weight: 700;
	line-height: 1.25;
	color: #1f2937;
}

.icsc-forminator-enquiry .forminator-ui {
	margin: 0;
}

.icsc-forminator-enquiry form.forminator-custom-form {
	background: #fafafa;
	border: 1px solid var(--icsc-form-field-border);
	border-radius: 10px;
	padding: 28px 28px 32px;
}

.icsc-forminator-enquiry .forminator-label {
	font-size: 1.0625rem !important;
	font-weight: 600 !important;
	margin-bottom: 6px !important;
	color: #374151 !important;
}

.icsc-forminator-enquiry .forminator-input,
.icsc-forminator-enquiry .forminator-textarea,
.icsc-forminator-enquiry select.forminator-select--field {
	background-color: var(--icsc-form-field-bg) !important;
	border: 1px solid var(--icsc-form-field-border) !important;
	border-radius: 4px !important;
	font-size: 1.0625rem !important;
	line-height: 1.4 !important;
	padding: 12px 14px !important;
	color: #1f2937 !important;
}

.icsc-forminator-enquiry .forminator-textarea {
	min-height: 140px;
}

.icsc-forminator-enquiry--custom-order #order-details-1 .forminator-textarea,
.icsc-forminator-enquiry--custom-order .forminator-field-textarea:first-child .forminator-textarea {
	min-height: 220px;
}

.icsc-forminator-enquiry .forminator-field-select .select2-container .select2-selection--single,
.icsc-forminator-enquiry .forminator-field-select .select2-container .select2-selection--multiple,
.icsc-forminator-enquiry .forminator-select2 + .select2-container .select2-selection--single,
.icsc-forminator-enquiry .forminator-select2 + .select2-container .select2-selection--multiple {
	background-color: var(--icsc-form-field-bg) !important;
	border: 1px solid var(--icsc-form-field-border) !important;
	border-radius: 4px !important;
	min-height: 48px !important;
}

.icsc-forminator-enquiry .forminator-field-select .select2-container .select2-selection__rendered,
.icsc-forminator-enquiry .forminator-select2 + .select2-container .select2-selection__rendered {
	font-size: 1.0625rem !important;
	line-height: 46px !important;
	padding-left: 14px !important;
	color: #1f2937 !important;
}

.icsc-forminator-enquiry .forminator-field-select .select2-container .select2-selection__arrow,
.icsc-forminator-enquiry .forminator-select2 + .select2-container .select2-selection__arrow {
	height: 46px !important;
}

.icsc-forminator-enquiry .forminator-input:focus,
.icsc-forminator-enquiry .forminator-textarea:focus,
.icsc-forminator-enquiry select.forminator-select--field:focus,
.icsc-forminator-enquiry .forminator-field-select .select2-container.select2-container--focus .select2-selection--single,
.icsc-forminator-enquiry .forminator-field-select .select2-container.select2-container--open .select2-selection--single,
.icsc-forminator-enquiry .forminator-select2 + .select2-container.select2-container--focus .select2-selection--single,
.icsc-forminator-enquiry .forminator-select2 + .select2-container.select2-container--open .select2-selection--single {
	border-color: var(--icsc-form-accent) !important;
	outline: none;
	box-shadow: 0 0 0 1px var(--icsc-form-accent);
}

.icsc-forminator-enquiry input[readonly] {
	background: #ebebeb !important;
	color: #4b5563 !important;
}

.icsc-forminator-enquiry .forminator-row {
	margin-bottom: 4px;
}

.icsc-forminator-enquiry .forminator-button.forminator-button-submit {
	display: inline-block;
	margin-top: 8px;
	padding: 14px 30px !important;
	font-size: 1.125rem !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	border-radius: 4px !important;
	border: 2px solid var(--icsc-form-btn-bg) !important;
	background-color: var(--icsc-form-btn-bg) !important;
	color: #ffffff !important;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.icsc-forminator-enquiry .forminator-button.forminator-button-submit:hover,
.icsc-forminator-enquiry .forminator-button.forminator-button-submit:focus {
	background-color: var(--icsc-form-accent) !important;
	border-color: var(--icsc-form-accent) !important;
	color: #ffffff !important;
}

.icsc-forminator-enquiry .forminator-response-message {
	font-size: 1rem;
	border-radius: 8px;
}

.icsc-enquiry-form fieldset {
	border: 1px solid #e5e5e5;
	padding: 18px 20px;
	margin: 0 0 20px;
}

.icsc-enquiry-form legend {
	padding: 0 8px;
	font-weight: 600;
}

.icsc-enquiry-form p {
	margin: 0 0 14px;
}

.icsc-enquiry-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.icsc-enquiry-form input[type="text"],
.icsc-enquiry-form input[type="email"],
.icsc-enquiry-form input[type="tel"],
.icsc-enquiry-form input[type="number"],
.icsc-enquiry-form select,
.icsc-enquiry-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
}

.icsc-enquiry-form input[readonly] {
	background: #f5f5f5;
}

/* Responsive fieldset grids on desktop --------------------------------- */
@media (min-width: 768px) {

	.icsc-enquiry-form fieldset {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 24px;
		row-gap: 4px;
	}

	.icsc-enquiry-form fieldset > legend,
	.icsc-enquiry-form fieldset > .icsc-enquiry-field-row {
		grid-column: 1 / -1;
	}

	.icsc-enquiry-form fieldset > p {
		margin: 0 0 14px;
	}

	.icsc-enquiry-form fieldset > p.icsc-enquiry-field--full,
	.icsc-enquiry-form fieldset > p:has(textarea),
	.icsc-enquiry-form fieldset > p.icsc-enquiry-hp,
	.icsc-enquiry-form > p.icsc-enquiry-submit {
		grid-column: 1 / -1;
	}

	.icsc-enquiry-field-row {
		display: grid;
		column-gap: 24px;
		row-gap: 4px;
		margin: 0 0 14px;
	}

	.icsc-enquiry-field-row > p {
		margin: 0;
	}

	.icsc-enquiry-field-row--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.icsc-enquiry-field-row--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.icsc-enquiry-success.woocommerce-message {
	padding: 20px 20px;
	border: 1px solid #ccc;
	background: #efefef !important;
	margin: 0 0 24px;
	border-radius: 10px;
} 

/* -----------------------------------------------------------------------
 * WooCommerce Product Categories block - rendered as horizontal pills.
 * Targets the block markup:
 *   <ul class="wc-block-product-categories-list">
 *     <li class="wc-block-product-categories-list-item">
 *       <a><span class="...__name">Name</span></a>
 *       <span class="...__count"><span aria-hidden>3</span>...</span>
 *     </li>
 *   </ul>
 * -------------------------------------------------------------------- */

ul.wc-block-product-categories-list {
	list-style: none;
	margin: 30px 0 24px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 12px;
}

ul.wc-block-product-categories-list .wc-block-product-categories-list-item {
	list-style: none;
	margin: 0;
	padding: 0;
	display: inline-flex;
	align-items: center;
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	overflow: hidden;
	line-height: 1;
	transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

ul.wc-block-product-categories-list .wc-block-product-categories-list-item:hover,
ul.wc-block-product-categories-list .wc-block-product-categories-list-item:focus-within {
	background: #111827;
	border-color: #111827;
	box-shadow: 0 4px 14px rgba(17, 24, 39, 0.18);
	transform: translateY(-1px);
}

ul.wc-block-product-categories-list .wc-block-product-categories-list-item > a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px 9px 16px;
	color: #1f2937;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	border: 0;
	white-space: nowrap;
}

ul.wc-block-product-categories-list .wc-block-product-categories-list-item:hover > a,
ul.wc-block-product-categories-list .wc-block-product-categories-list-item:focus-within > a {
	color: #ffffff;
}

ul.wc-block-product-categories-list .wc-block-product-categories-list-item__name {
	display: inline-block;
}

ul.wc-block-product-categories-list .wc-block-product-categories-list-item-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	margin-right: 8px;
	padding: 0 7px;
	background: rgba(17, 24, 39, 0.08);
	color: #1f2937;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	transition: background-color 0.15s ease, color 0.15s ease;
}

ul.wc-block-product-categories-list .wc-block-product-categories-list-item:hover .wc-block-product-categories-list-item-count,
ul.wc-block-product-categories-list .wc-block-product-categories-list-item:focus-within .wc-block-product-categories-list-item-count {
	background: rgba(255, 255, 255, 0.18);
	color: #ffffff;
}

ul.wc-block-product-categories-list .wc-block-product-categories-list-item-count .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Nested children: keep them inline-flexed too. */
ul.wc-block-product-categories-list .wc-block-product-categories-list--has-images,
ul.wc-block-product-categories-list ul.children {
	flex-basis: 100%;
	margin-top: 4px;
	padding-left: 0;
}
