/* =====================================================================
 * Single product layout (woocommerce/content-single-product.php)
 *
 * Plain CSS because the theme ships a pre-compiled Tailwind stylesheet
 * with no build step, so grid utilities not already used elsewhere
 * (lg:grid-cols-3, lg:row-span-2, ...) don't exist.
 *
 * Mobile: source order (media -> summary -> tabs), stacked by .flex-col.
 * Desktop (lg, 1024px+): two columns, tabs sit under the media in the
 * left column while the summary spans the full height on the right.
 * ===================================================================== */

@media (min-width: 1024px) {
	.uc-product-layout {
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		/* Extra height from a tall summary goes to the tabs row, not
		   between the images and the tabs. */
		grid-template-rows: auto 1fr;
	}

	.uc-product-layout__media {
		grid-column: 1;
		grid-row: 1;
	}

	.uc-product-layout__summary {
		grid-column: 2;
		grid-row: 1 / span 2;
	}

	.uc-product-layout__tabs {
		grid-column: 1;
		grid-row: 2;
	}
}

/* =====================================================================
 * "Enquire Now" on enquiry-only products (inc/enquiry-products.php).
 * Sits where the add-to-basket button would, beside the yellow price
 * box: same position, size and colours, without the basket icon.
 * ===================================================================== */

.type-product .entry-summary .uc-enquire-btn {
	position: absolute;
	bottom: 0;
	right: 0;
	z-index: 20;
	width: 50%;
	padding: 1.5rem 0;
	background-color: #e1ff2c;
	border: 1px solid #e1ff2c;
	border-radius: 0;
	color: #000;
	font-family: AktivGrotesk, sans-serif;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1rem;
	cursor: pointer;
	transition: background-color 0.5s ease;
}

/* Divider between the price and the button. */
.type-product .entry-summary .uc-enquire-btn::after {
	content: "";
	position: absolute;
	left: 0;
	top: 8px;
	width: 1px;
	height: calc(100% - 16px);
	background-color: #555;
}

.type-product .entry-summary .uc-enquire-btn:hover,
.type-product .entry-summary .uc-enquire-btn:focus-visible {
	background-color: #cbe820;
}

@media (min-width: 1024px) {
	.type-product .entry-summary .uc-enquire-btn {
		width: 60%;
	}
}

/* =====================================================================
 * Enquiry form in the Quick Quote modal (inc/enquiry-products.php).
 * Same look as the landing page form (assets/css/landing-page.css,
 * .uc-form markup). Keep the two in step.
 *
 * The modal goes dark only while the enquiry form is the panel showing,
 * so the floating Quick Quote tab etc. stay white: they hide every other
 * panel when they open the modal.
 * ===================================================================== */

#quick-quote-modal:has(.uc-enquiry-form:not([hidden])) {
	background: #1c1c1c;
	border-top: 5px solid #e1ff2c;
	color: #fff;
}

#quick-quote-modal:has(.uc-enquiry-form:not([hidden])) .close-modal-btn {
	color: #fff;
}

#quick-quote-modal:has(.uc-enquiry-form:not([hidden])) [data-quick-quote-title] {
	padding-top: 8px;
	font-family: AktivGroteskEx, AktivGrotesk, sans-serif;
	font-weight: 400;
	font-size: 28px;
	line-height: 1.25;
	letter-spacing: -.04em;
	text-transform: uppercase;
	text-align: left;
	color: #fff;
}

.uc-enquiry-form {
	--lp-lime: #e1ff2c;
	--lp-lime-hover: #c9e625;
	--lp-black: #090909;
	--lp-input: #2a2a2a;
	--lp-input-border: #464646;
	--lp-body: AktivGrotesk, sans-serif;

	width: 560px;
	max-width: 100%;
	padding-top: 20px;
	font-family: var(--lp-body);
	-webkit-font-smoothing: antialiased;
}

.uc-enquiry-form .wpcf7 form { margin: 0; }
.uc-enquiry-form .uc-form { display: grid; gap: 16px; }
/* CF7 auto-<p>/<br>: neutralise so the grid layout holds either way */
.uc-enquiry-form .uc-form br { display: none; }
.uc-enquiry-form .uc-field,
.uc-enquiry-form .uc-field > p { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.uc-enquiry-form .uc-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.uc-enquiry-form .uc-row > p { display: contents; }

.uc-enquiry-form .uc-field label {
	font-size: 11px; line-height: 16.5px; font-weight: 700;
	letter-spacing: .55px; text-transform: uppercase; color: #d5d5d5;
}
.uc-enquiry-form .uc-field .wpcf7-form-control-wrap { display: block; }

.uc-enquiry-form .uc-field input,
.uc-enquiry-form .uc-field select,
.uc-enquiry-form .uc-field textarea {
	display: block; width: 100%; min-height: 52px;
	padding: 0 15px; margin: 0;
	background-color: var(--lp-input); border: 1px solid var(--lp-input-border); border-radius: 0;
	font-family: var(--lp-body); font-size: 14px; font-weight: 700; color: #fff;
	transition: border-color .15s ease;
}
/* Not on the landing page form: the enquiry form has a message box. */
.uc-enquiry-form .uc-field textarea { height: 104px; padding: 14px 15px; resize: vertical; }
.uc-enquiry-form .uc-field input::placeholder,
.uc-enquiry-form .uc-field textarea::placeholder { color: rgba(255, 255, 255, .6); opacity: 1; }
.uc-enquiry-form .uc-field input:focus,
.uc-enquiry-form .uc-field select:focus,
.uc-enquiry-form .uc-field textarea:focus { outline: none; border-color: var(--lp-lime); }
.uc-enquiry-form .uc-field input:focus-visible,
.uc-enquiry-form .uc-field select:focus-visible,
.uc-enquiry-form .uc-field textarea:focus-visible { box-shadow: 0 0 0 1px var(--lp-lime); }
.uc-enquiry-form #uc-enq-postcode { text-transform: uppercase; }

.uc-enquiry-form .uc-field select {
	-webkit-appearance: none; appearance: none; cursor: pointer;
	padding-right: 40px;
	background-image: url(../images/landing-page/chevron.svg);
	background-repeat: no-repeat;
	background-position: right 15px center;
	background-size: 10px 6px;
	text-overflow: ellipsis;
}
.uc-enquiry-form .uc-field select option { background: var(--lp-input); color: #fff; }

/* Validation */
.uc-enquiry-form .uc-field .wpcf7-not-valid { border-color: #ff6b6b; }
.uc-enquiry-form .wpcf7-not-valid-tip { margin-top: 6px; font-size: 12px; line-height: 16px; color: #ff8a8a; }

/* Submit */
.uc-enquiry-form .uc-submit {
	display: flex; align-items: center; justify-content: center; gap: 16px;
	width: 100%; min-height: 56px; margin-top: 8px; padding: 0 24px;
	background: var(--lp-lime); color: var(--lp-black); border: 0; border-radius: 0; cursor: pointer;
	font-family: var(--lp-body); font-size: 14px; line-height: 20px; font-weight: 700;
	transition: background-color .15s ease;
}
.uc-enquiry-form .uc-submit:hover { background: var(--lp-lime-hover); }
.uc-enquiry-form .uc-submit:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.uc-enquiry-form .uc-submit:disabled { opacity: .6; cursor: progress; }
.uc-enquiry-form .uc-submit svg { flex: none; width: 16px; height: 16px; }

/* Loading state (class toggled by uc-pages.js while CF7 is submitting) */
.uc-enquiry-form .uc-submit__spinner {
	display: none; flex: none;
	width: 16px; height: 16px;
	border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
	animation: uc-enquiry-spin .7s linear infinite;
}
.uc-enquiry-form .uc-submit.is-loading { opacity: 1; cursor: progress; }
.uc-enquiry-form .uc-submit.is-loading svg { display: none; }
.uc-enquiry-form .uc-submit.is-loading .uc-submit__spinner { display: block; }
@keyframes uc-enquiry-spin { to { transform: rotate(360deg); } }

/* The button has its own spinner, so hide CF7's default one */
.uc-enquiry-form .wpcf7-spinner { display: none !important; }

.uc-enquiry-form .uc-disclaimer { margin: 0; font-size: 10px; line-height: 16px; color: #8d8d8d; text-align: center; }

/* Response message */
.uc-enquiry-form .wpcf7 form .wpcf7-response-output {
	margin: 16px 0 0; padding: 12px 15px;
	border: 1px solid var(--lp-input-border);
	font-size: 13px; line-height: 20px; color: #fff;
}
.uc-enquiry-form .wpcf7 form.sent .wpcf7-response-output { border-color: var(--lp-lime); color: var(--lp-lime); }
.uc-enquiry-form .wpcf7 form.invalid .wpcf7-response-output,
.uc-enquiry-form .wpcf7 form.unaccepted .wpcf7-response-output,
.uc-enquiry-form .wpcf7 form.failed .wpcf7-response-output,
.uc-enquiry-form .wpcf7 form.spam .wpcf7-response-output { border-color: #ff6b6b; color: #ff8a8a; }

@media (max-width: 520px) {
	.uc-enquiry-form .uc-row { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.uc-enquiry-form *, .uc-enquiry-form *::before, .uc-enquiry-form *::after { transition: none !important; }
	.uc-enquiry-form .uc-submit__spinner { animation-duration: 1.5s; }
}

/* =====================================================================
 * Main product image (woocommerce/single-product/product-image.php):
 * centred. The <img> has Tailwind's object-left; this selector is more
 * specific, so it wins without !important. The gallery JS (script.min.js)
 * only swaps the src, so this holds when thumbnails are clicked.
 * ===================================================================== */

.uc-product-gallery-active {
	display: flex;
	justify-content: center;
}

.uc-product-gallery-active img {
	object-position: center;
}
