/*
 * Goqle Request a Quote – frontend styles.
 *
 * Intentionally minimal: we reuse WooCommerce's button/form classes and only
 * override what's necessary to brand the quote workflow with #d31a5c.
 */

:root {
	--goqle-brand: #d31a5c;
	--goqle-brand-dark: #b8154e;
	--goqle-brand-soft: #fdeaf2;
	--goqle-text: #2b2b2b;
	--goqle-muted: #6b6b6b;
	--goqle-border: #e5e5e5;
}

/* --- Single product: Add to quote --------------------------------------- */

.goqle-quote-quantity {
	flex: 0 0 auto;
}

.goqle-quote-quantity input.goqle-quote-qty-input {
	width: 4.5em;
}

.goqle-quote-wrap {
	margin: 0.75em 0 1.25em;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em 0.75em;
}

.woocommerce div.product form.cart + .goqle-quote-wrap,
.goqle-quote-wrap {
	clear: both;
}

.goqle-quote-button.button.alt,
.goqle-quote-button.button {
	background: transparent;
	color: var(--goqle-brand);
	border: 1px solid var(--goqle-brand);
	box-shadow: none;
	text-shadow: none;
	padding: 0.55em 1.1em;
	line-height: 1.4;
	font-weight: 500;
	border-radius: 3px;
	cursor: pointer;
	transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.goqle-quote-button.button.alt:hover,
.goqle-quote-button.button:hover,
.goqle-quote-button.button.alt:focus,
.goqle-quote-button.button:focus {
	background: var(--goqle-brand);
	color: #fff;
	border-color: var(--goqle-brand);
}

.goqle-quote-button[disabled],
.goqle-quote-button.is-loading {
	opacity: 0.6;
	cursor: progress;
}

.goqle-quote-button.is-added {
	background: var(--goqle-brand);
	color: #fff;
	border-color: var(--goqle-brand);
}

.goqle-quote-view-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	color: var(--goqle-brand);
	font-size: 0.92em;
	text-decoration: underline;
}

.goqle-quote-view-link:hover {
	color: var(--goqle-brand-dark);
}

.goqle-quote-view-link .goqle-quote-count {
	display: inline-block;
	min-width: 1.4em;
	padding: 0 0.4em;
	background: var(--goqle-brand);
	color: #fff;
	border-radius: 999px;
	font-size: 0.8em;
	text-align: center;
	line-height: 1.6;
}

.goqle-quote-message {
	flex-basis: 100%;
	margin: 0.25em 0 0;
	font-size: 0.9em;
	color: var(--goqle-muted);
	min-height: 1.2em;
}

.goqle-quote-message.is-success {
	color: var(--goqle-brand);
}

.goqle-quote-message.is-error {
	color: #b8154e;
}

/* --- Header / menu badge ----------------------------------------------- */

span.goqle-quote-count {
	display: inline-block;
	min-width: 1.4em;
	padding: 0 0.4em;
	margin-left: 0.35em;
	background: var(--goqle-brand);
	color: #fff;
	border-radius: 999px;
	font-size: 0.78em;
	line-height: 1.6;
	text-align: center;
}

/* --- Cart-style quote link (header) ------------------------------------ */

.goqle-quote-cart {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	/* Light colour so it reads well on a dark background. */
	color: #fff;
	text-decoration: none;
	line-height: 1;
	font-weight: 500;
	transition: color 150ms ease, opacity 150ms ease;
}

.goqle-quote-cart:hover,
.goqle-quote-cart:focus {
	color: #fff;
	opacity: 0.85;
	text-decoration: none;
}

.goqle-quote-cart__icon {
	display: block;
	flex: 0 0 auto;
}

.goqle-quote-cart__label {
	font-size: 0.95em;
	white-space: nowrap;
}

/* The count badge sitting on the cart link. */
.goqle-quote-cart .goqle-quote-count {
	margin-left: 0;
}

/* --- Quote page --------------------------------------------------------- */

.goqle-quote-table .product-thumbnail img {
	width: 64px;
	height: auto;
}

.goqle-quote-table .product-name a {
	color: var(--goqle-text);
	text-decoration: none;
}

.goqle-quote-table .product-name a:hover {
	color: var(--goqle-brand);
}

.goqle-quote-sku {
	font-size: 0.85em;
	color: var(--goqle-muted);
	margin-top: 0.25em;
}

.goqle-quote-table .product-remove .remove {
	color: var(--goqle-brand) !important;
	font-size: 1.2em;
	font-weight: 700;
	text-decoration: none;
}

.goqle-quote-table .product-remove .remove:hover {
	background: var(--goqle-brand);
	color: #fff !important;
}

.goqle-quote-table .quantity input.qty {
	width: 4.5em;
}

.goqle-quote-table tfoot td.actions {
	text-align: right;
}

/* --- Customer details form --------------------------------------------- */

.goqle-quote-request-form {
	margin-top: 2.25em;
	padding: 1.5em;
	border: 1px solid var(--goqle-border);
	border-radius: 4px;
	background: #fff;
}

.goqle-quote-heading {
	margin: 0 0 1em;
	font-size: 1.25em;
	color: var(--goqle-text);
	border-bottom: 2px solid var(--goqle-brand);
	padding-bottom: 0.4em;
	display: inline-block;
}

.goqle-quote-request-form .form-row {
	display: block;
	margin-bottom: 1em;
}

.goqle-quote-request-form .form-row label {
	display: block;
	margin-bottom: 0.25em;
	font-weight: 500;
}

.goqle-quote-request-form .form-row input.input-text,
.goqle-quote-request-form .form-row textarea.input-text {
	width: 100%;
	padding: 0.6em 0.75em;
	border: 1px solid var(--goqle-border);
	border-radius: 3px;
	background: #fff;
	box-sizing: border-box;
	font: inherit;
}

.goqle-quote-request-form .form-row input.input-text:focus,
.goqle-quote-request-form .form-row textarea.input-text:focus {
	outline: none;
	border-color: var(--goqle-brand);
	box-shadow: 0 0 0 3px var(--goqle-brand-soft);
}

.goqle-quote-request-form .form-row .required {
	color: var(--goqle-brand);
	text-decoration: none;
}

@media (min-width: 720px) {
	.goqle-quote-request-form .form-row-first {
		float: left;
		width: 48%;
		clear: left;
	}
	.goqle-quote-request-form .form-row-last {
		float: right;
		width: 48%;
	}
	.goqle-quote-request-form .form-row-wide {
		clear: both;
	}
}

.goqle-quote-request-form .goqle-quote-submit.button.alt,
.goqle-quote-request-form .goqle-quote-submit.button {
	background: var(--goqle-brand);
	color: #fff;
	border: 0;
	padding: 0.75em 1.5em;
	font-weight: 600;
	border-radius: 3px;
	box-shadow: none;
	text-shadow: none;
}

.goqle-quote-request-form .goqle-quote-submit.button.alt:hover,
.goqle-quote-request-form .goqle-quote-submit.button:hover {
	background: var(--goqle-brand-dark);
	color: #fff;
}

/* Empty state */

.goqle-quote-empty {
	padding: 1.25em 1.5em;
	border-left: 4px solid var(--goqle-brand);
}

.goqle-quote-empty .button {
	margin-left: 1em;
}
