/* Attribute Swatches for WooCommerce: Request a Quote */

.wcas-quote-wrap,
.wcas-quote-modal {
	--wcas-q-bg: var(--brand-blue, #0a3d5a);
	--wcas-q-hover: var(--hover-black, #111111);
}

/* ---------- Button (same look as the site buttons) ---------- */
button.wcas-quote-btn,
.wcas-quote-modal button.wcas-quote-submit {
	box-sizing: border-box;
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 12px 24px;
	font-family: 'Avenir', Helvetica, Arial, sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	color: #ffffff;
	background: var(--wcas-q-bg);
	border: 0;
	border-radius: 150px;
	box-shadow: none;
	cursor: pointer;
	transition: transform .3s, -webkit-transform .3s, background-color .3s, color .3s;
	transition-timing-function: cubic-bezier(0.75, 0, 0.125, 1);
}

button.wcas-quote-btn .creative-button-inner {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
}

button.wcas-quote-btn .cretive-button-text {
	display: inline-block;
}

.wcas-quote-full-yes button.wcas-quote-btn,
.wcas-quote-modal button.wcas-quote-submit {
	display: flex;
	width: 100%;
}

.wcas-quote-modal button.wcas-quote-submit {
	padding: 10px 0;
}

button.wcas-quote-btn:hover,
button.wcas-quote-btn:focus-visible,
.wcas-quote-modal button.wcas-quote-submit:hover,
.wcas-quote-modal button.wcas-quote-submit:focus-visible {
	color: #ffffff;
	background: var(--wcas-q-hover);
}

button.wcas-quote-btn:active,
.wcas-quote-modal button.wcas-quote-submit:active {
	transform: translateY(1px);
}

.wcas-quote-modal button.wcas-quote-submit:disabled {
	opacity: .6;
	cursor: wait;
}

.wcas-quote-icon {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.wcas-quote-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.wcas-quote-icon--right {
	order: 2;
}

/* ---------- Modal ---------- */
html.wcas-quote-lock {
	overflow: hidden;
}

.wcas-quote-modal {
	--wcas-accent: #111827;
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	text-align: left;
	font-family: 'Avenir', Helvetica, Arial, sans-serif;
}

.wcas-quote-modal[hidden] {
	display: none !important;
}

.wcas-quote-modal *,
.wcas-quote-modal *::before,
.wcas-quote-modal *::after {
	box-sizing: border-box;
}

.wcas-quote-overlay {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, .6);
	animation: wcas-quote-fade .2s ease;
}

.wcas-quote-dialog {
	position: relative;
	width: 100%;
	max-width: 700px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 20px 22px 18px;
	color: #111827;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
	animation: wcas-quote-pop .22s ease;
}

.wcas-quote-dialog.has-picker {
	max-width: 860px;
}

.wcas-quote-dialog.is-done {
	max-width: 560px;
}

.wcas-quote-modal button.wcas-quote-x {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	font-size: 26px;
	line-height: 1;
	color: #6b7280;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.wcas-quote-modal button.wcas-quote-x:hover,
.wcas-quote-modal button.wcas-quote-x:focus-visible {
	color: #111827;
	background: #f3f4f6;
}

.wcas-quote-title {
	margin: 0 32px 4px 0;
	font-size: 23px;
	line-height: 1.2;
	color: #111827;
}

.wcas-quote-intro {
	margin: 0 0 8px;
	color: #4b5563;
}

.wcas-quote-product {
	display: inline-block;
	margin: 0 0 10px;
	padding: 4px 10px;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	background: #f3f4f6;
	border-radius: 999px;
}

/* ---------- Layout: picture and swatches beside the form ---------- */
.wcas-quote-body {
	display: block;
}

.wcas-quote-dialog.has-picker .wcas-quote-body {
	display: grid;
	grid-template-columns: minmax(0, 4.2fr) minmax(0, 5.8fr);
	gap: 22px;
	align-items: start;
}

.wcas-quote-dialog.has-picker .wcas-quote-main {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.wcas-quote-dialog.has-picker .wcas-quote-form {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.wcas-quote-dialog.is-done .wcas-quote-body {
	display: block;
}

.wcas-quote-dialog.is-done .wcas-quote-side {
	display: none;
}

.wcas-quote-media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f3f4f6;
	border-radius: 12px;
}

.wcas-quote-modal img.wcas-quote-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
	transition: opacity .2s ease;
}

.wcas-quote-modal img.wcas-quote-img.is-loading {
	opacity: .35;
}

.wcas-quote-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.wcas-quote-modal button.wcas-quote-thumb {
	width: 52px;
	height: 52px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: #f3f4f6;
	border: 2px solid transparent;
	border-radius: 8px;
	box-shadow: none;
	cursor: pointer;
	opacity: .75;
	transition: opacity .15s ease, border-color .15s ease;
}

.wcas-quote-modal button.wcas-quote-thumb:hover,
.wcas-quote-modal button.wcas-quote-thumb:focus-visible,
.wcas-quote-modal button.wcas-quote-thumb.is-active {
	opacity: 1;
	background: #f3f4f6;
}

.wcas-quote-modal button.wcas-quote-thumb.is-active {
	border-color: var(--wcas-accent);
}

.wcas-quote-modal button.wcas-quote-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wcas-quote-swatch-box {
	margin-top: 0;
	text-align: left;
}

.wcas-quote-swatch-box .wcas-group + .wcas-group {
	margin-top: 14px;
	padding-top: 14px;
}

.wcas-quote-swatch-box .wcas-list {
	gap: 8px;
}

.wcas-quote-main .wcas-quote-swatch-box {
	order: -1;
	margin-bottom: 4px;
}

/* ---------- Form ---------- */
.wcas-quote-form[hidden],
.wcas-quote-done[hidden] {
	display: none !important;
}

.wcas-quote-field {
	margin: 0 0 12px;
}

.wcas-quote-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 12px;
}

.wcas-quote-field label {
	display: block;
	margin: 0 0 5px;
	font-size: 14px;
	font-weight: 600;
	color: #374151;
}

.wcas-quote-req {
	color: #dc2626;
}

.wcas-quote-modal input.wcas-quote-input,
.wcas-quote-modal textarea.wcas-quote-input {
	display: block;
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	font: inherit;
	font-size: 15px;
	color: #111827;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	box-shadow: none;
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.wcas-quote-modal textarea.wcas-quote-input {
	resize: vertical;
	min-height: 80px;
}

.wcas-quote-modal textarea.wcas-quote-swatches {
	min-height: 62px;
	color: #374151;
	background: #f9fafb;
}

.wcas-quote-modal textarea.wcas-quote-swatches[readonly] {
	resize: none;
	cursor: default;
}

.wcas-quote-modal input.wcas-quote-input:focus,
.wcas-quote-modal textarea.wcas-quote-input:focus {
	border-color: var(--wcas-accent);
	box-shadow: 0 0 0 3px rgba(17, 24, 39, .12);
}

.wcas-quote-modal .wcas-quote-input[aria-invalid="true"] {
	border-color: #dc2626;
}

.wcas-quote-modal .wcas-clickable,
.wcas-quote-modal .wcas-item {
	cursor: pointer;
}

.wcas-quote-modal .wcas-item.is-locked,
.wcas-quote-modal .wcas-item.is-locked * {
	pointer-events: none;
	cursor: default;
}

.wcas-quote-modal .wcas-item.is-locked {
	opacity: .96;
}

.wcas-quote-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.wcas-quote-status {
	margin: 0 0 10px;
	font-size: 14px;
}

.wcas-quote-status.is-error {
	color: #b91c1c;
}

/* ---------- Success message ---------- */
.wcas-quote-done {
	padding: 4px 0 0;
	text-align: left;
}

.wcas-quote-done p {
	margin: 0 0 20px;
	font-size: 16px;
	line-height: 1.5;
	text-align: left;
	color: #065f46;
}

@keyframes wcas-quote-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes wcas-quote-pop {
	from { opacity: 0; transform: translateY(12px) scale(.98); }
	to   { opacity: 1; transform: none; }
}

@media (max-width: 800px) {
	.wcas-quote-dialog.has-picker .wcas-quote-body {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	.wcas-quote-media {
		aspect-ratio: 4 / 3;
	}
}

@media (max-width: 520px) {
	.wcas-quote-dialog {
		padding: 24px 18px;
	}
	.wcas-quote-row {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wcas-quote-overlay,
	.wcas-quote-dialog {
		animation: none;
	}
}
