/* WooCommerce Product Inquiry - storefront styles */

.wcpi-inquiry-wrap {
	margin: 1em 0;
}

.wcpi-inline-notice {
	margin: .75em 0 0;
	padding: .6em .8em;
	border-left: 4px solid #b32d2e;
	background: #fcf0f1;
	color: #8a1f20;
	font-size: .9em;
}

.wcpi-inline-notice[hidden] {
	display: none;
}

html.wcpi-modal-open {
	overflow: hidden;
}

.wcpi-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(17, 24, 39, .6);
	opacity: 0;
	transition: opacity .18s ease;
}

.wcpi-overlay[hidden] {
	display: none;
}

.wcpi-overlay.is-open {
	opacity: 1;
}

.wcpi-dialog {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: var(--wcpi-width, 860px);
	container-type: inline-size;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	padding: 28px 28px 28px;
	border-radius: 16px;
	background: #fff;
	color: #1f2937;
	font-size: 16px;
	line-height: 1.5;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
	transform: translateY(12px);
	transition: transform .18s ease;
}

.wcpi-overlay.is-open .wcpi-dialog {
	transform: none;
}

.wcpi-dialog:focus {
	outline: none;
}

.wcpi-dialog *,
.wcpi-dialog *::before,
.wcpi-dialog *::after {
	box-sizing: border-box;
}

.wcpi-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #4b5563;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.wcpi-close:hover {
	background: #f3f4f6;
	color: #111827;
}

.wcpi-title {
	margin: 0 32px 16px 0;
	font-size: 1.35em;
	line-height: 1.25;
}

.wcpi-subtitle {
	margin: 0 0 12px;
	font-size: 1.05em;
}

.wcpi-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px 32px;
	align-items: start;
}

.wcpi-col[hidden],
.wcpi-qty-block[hidden] {
	display: none;
}

.wcpi-col-right .wcpi-submit {
	margin-top: 4px;
}

@container (min-width: 720px) {
	.wcpi-layout:not(.is-picking) {
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	}

	.wcpi-col-left {
		padding-right: 8px;
	}

	.wcpi-col-right {
		padding: 4px 0 0 28px;
		border-left: 1px solid #e5e7eb;
	}
}

.wcpi-status {
	margin: 0;
	padding: 24px 0;
	text-align: center;
	color: #4b5563;
}

.wcpi-status[hidden] {
	display: none;
}

.wcpi-product {
	margin-bottom: 16px;
}

.wcpi-product-image {
	display: block;
	width: 100%;
	height: auto;
	max-height: 260px;
	aspect-ratio: 4 / 3;
	margin-bottom: 12px;
	border-radius: 12px;
	object-fit: cover;
	background: #f3f4f6;
}

.wcpi-product-image[hidden] {
	display: none;
}

.wcpi-product-name {
	margin: 0;
	font-size: 1.1em;
	font-weight: 700;
}

.wcpi-product-variation {
	margin: 2px 0 0;
	padding: 0;
	list-style: none;
	color: #4b5563;
	font-size: .9em;
}

.wcpi-product-price {
	margin: 4px 0 0;
	font-size: 1.15em;
	font-weight: 700;
}

.wcpi-row {
	margin-bottom: 14px;
}

.wcpi-row label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
	font-size: .92em;
}

.wcpi-req {
	color: #b32d2e;
}

.wcpi-row select {
	display: block;
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #9ca3af;
	border-radius: 6px;
	background: #fff;
	color: #111827;
	font: inherit;
	font-size: 16px;
}

.wcpi-selector[hidden],
[data-wcpi="details"][hidden] {
	display: none;
}

.wcpi-row input[type="text"],
.wcpi-row input[type="email"],
.wcpi-row input[type="tel"],
.wcpi-row textarea {
	display: block;
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #9ca3af;
	border-radius: 6px;
	background: #fff;
	color: #111827;
	font: inherit;
	font-size: 16px; /* prevents iOS zoom */
}

.wcpi-row textarea {
	resize: vertical;
	min-height: 80px;
}

.wcpi-row input[aria-invalid="true"],
.wcpi-row textarea[aria-invalid="true"] {
	border-color: #b32d2e;
}

.wcpi-dialog input:focus-visible,
.wcpi-dialog textarea:focus-visible,
.wcpi-dialog button:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.wcpi-qty {
	display: inline-flex;
	align-items: stretch;
}

.wcpi-qty input[type="number"] {
	width: 72px;
	margin: 0;
	padding: 8px 4px;
	border: 1px solid #9ca3af;
	border-right: 0;
	border-left: 0;
	border-radius: 0;
	text-align: center;
	font: inherit;
	font-size: 16px;
	-moz-appearance: textfield;
	appearance: textfield;
}

.wcpi-qty input[type="number"]::-webkit-outer-spin-button,
.wcpi-qty input[type="number"]::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.wcpi-qty-btn {
	width: 42px;
	margin: 0;
	padding: 0;
	border: 1px solid #9ca3af;
	background: #f3f4f6;
	color: #111827;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.wcpi-qty-btn:first-child {
	border-radius: 6px 0 0 6px;
}

.wcpi-qty-btn:last-child {
	border-radius: 0 6px 6px 0;
}

.wcpi-qty-btn:disabled {
	opacity: .45;
	cursor: not-allowed;
}

.wcpi-subtotal {
	display: flex;
	justify-content: space-between;
	margin: 0;
	padding: 10px 12px;
	border-radius: 6px;
	background: #f3f4f6;
}

.wcpi-error {
	margin: 4px 0 0;
	min-height: 0;
	color: #b32d2e;
	font-size: .88em;
}

.wcpi-error:empty {
	display: none;
}

.wcpi-form-error {
	margin: 0 0 12px;
	font-size: .95em;
}

.wcpi-submit {
	display: block;
	width: 100%;
	margin: 0;
	padding: 12px 16px;
	border: 0;
	border-radius: 6px;
	background: #1d2327;
	color: #fff;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
}

.wcpi-submit:hover {
	background: #000;
	color: #fff;
}

/* Preloader inside the submit button */
.wcpi-submit.is-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.wcpi-submit.is-loading::before {
	content: "";
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: wcpi-spin .7s linear infinite;
}

@keyframes wcpi-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.wcpi-submit.is-loading::before {
		animation-duration: 1.6s;
	}
}

.wcpi-submit:disabled {
	opacity: .65;
	cursor: wait;
}

.wcpi-success {
	text-align: center;
}

.wcpi-success .wcpi-title {
	margin-right: 0;
}

.wcpi-success p {
	margin: 0 0 12px;
}

.wcpi-success [data-wcpi="success-title"]:focus {
	outline: none;
}

/* Honeypot: invisible to people and assistive tech. */
.wcpi-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 600px) {
	.wcpi-overlay {
		align-items: flex-end;
		padding: 0;
	}

	.wcpi-dialog {
		max-width: none;
		max-height: 92vh;
		max-height: 92dvh;
		border-radius: 14px 14px 0 0;
		padding: 24px 16px 20px;
	}

	.wcpi-product-image {
		max-height: 180px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wcpi-overlay,
	.wcpi-dialog {
		transition: none;
	}
}

/* Thank-you page */
.wcpi-ty {
	--wcpi-accent: #16a34a;
	max-width: 860px;
	margin: 0 auto;
	color: #1f2937;
}

.wcpi-ty *,
.wcpi-ty *::before,
.wcpi-ty *::after {
	box-sizing: border-box;
}

.wcpi-ty-hero {
	position: relative;
	overflow: hidden;
	padding: 40px 24px 32px;
	border-radius: 20px;
	background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%);
	text-align: center;
}

.wcpi-ty-check {
	display: block;
	margin: 0 auto 12px;
}

.wcpi-ty-check-circle {
	stroke: var(--wcpi-accent);
	stroke-width: 3;
	stroke-dasharray: 151;
	stroke-dashoffset: 151;
	animation: wcpi-draw .7s ease forwards;
}

.wcpi-ty-check-mark {
	stroke: var(--wcpi-accent);
	stroke-width: 4;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 40;
	stroke-dashoffset: 40;
	animation: wcpi-draw .45s ease .55s forwards;
}

@keyframes wcpi-draw {
	to { stroke-dashoffset: 0; }
}

.wcpi-ty-title {
	margin: 0 0 8px;
	font-size: clamp(1.6rem, 4vw, 2.2rem);
	line-height: 1.2;
}

.wcpi-ty-lead {
	max-width: 520px;
	margin: 0 auto 14px;
	color: #4b5563;
}

.wcpi-ty-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin: 0;
}

.wcpi-ty-badge {
	padding: 4px 14px;
	border-radius: 999px;
	background: var(--wcpi-accent);
	color: #fff;
	font-size: .85em;
	font-weight: 600;
}

.wcpi-ty-badge-soft {
	background: #fff;
	color: #374151;
	box-shadow: inset 0 0 0 1px #d1d5db;
}

/* Confetti */
.wcpi-ty-confetti i {
	position: absolute;
	top: -12px;
	width: 8px;
	height: 14px;
	border-radius: 2px;
	opacity: 0;
	animation: wcpi-fall 2.6s ease-in 1 forwards;
}

.wcpi-ty-confetti i:nth-child(1) { left: 8%;  background: #f59e0b; animation-delay: .1s; }
.wcpi-ty-confetti i:nth-child(2) { left: 20%; background: #3b82f6; animation-delay: .5s; }
.wcpi-ty-confetti i:nth-child(3) { left: 33%; background: #ec4899; animation-delay: .2s; }
.wcpi-ty-confetti i:nth-child(4) { left: 46%; background: #16a34a; animation-delay: .7s; }
.wcpi-ty-confetti i:nth-child(5) { left: 59%; background: #f59e0b; animation-delay: .3s; }
.wcpi-ty-confetti i:nth-child(6) { left: 72%; background: #8b5cf6; animation-delay: .6s; }
.wcpi-ty-confetti i:nth-child(7) { left: 84%; background: #3b82f6; animation-delay: .15s; }
.wcpi-ty-confetti i:nth-child(8) { left: 93%; background: #ec4899; animation-delay: .45s; }

@keyframes wcpi-fall {
	0%   { opacity: 1; transform: translateY(0) rotate(0); }
	100% { opacity: 0; transform: translateY(260px) rotate(300deg); }
}

/* Steps */
.wcpi-ty-steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin: 20px 0;
	padding: 0;
	list-style: none;
}

.wcpi-ty-step {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #fff;
	font-size: .92em;
}

.wcpi-ty-step > span:last-child {
	color: #6b7280;
}

.wcpi-ty-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin-bottom: 4px;
	border-radius: 50%;
	background: #e5e7eb;
	color: #374151;
	font-weight: 700;
	font-size: .85em;
}

.wcpi-ty-step.is-done {
	border-color: #bbf7d0;
	background: #f0fdf4;
}

.wcpi-ty-step.is-done .wcpi-ty-step-num {
	background: var(--wcpi-accent);
	color: #fff;
}

/* Cards */
.wcpi-ty-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
}

.wcpi-ty-card {
	padding: 20px;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.wcpi-ty-card h3 {
	margin: 0 0 14px;
	font-size: 1em;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #6b7280;
}

.wcpi-ty-product {
	display: flex;
	gap: 14px;
	align-items: center;
	margin-bottom: 12px;
}

.wcpi-ty-product img {
	flex: 0 0 auto;
	width: 84px;
	height: 84px;
	border-radius: 12px;
	object-fit: cover;
	background: #f3f4f6;
}

.wcpi-ty-product-name {
	margin: 0;
	font-weight: 700;
	font-size: 1.05em;
}

.wcpi-ty-muted {
	margin: 4px 0 0;
	color: #6b7280;
	font-size: .9em;
}

.wcpi-ty-list {
	margin: 0;
}

.wcpi-ty-list > div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 9px 0;
	border-bottom: 1px dashed #e5e7eb;
}

.wcpi-ty-list > div:last-child {
	border-bottom: 0;
}

.wcpi-ty-list dt {
	margin: 0;
	color: #6b7280;
}

.wcpi-ty-list dd {
	margin: 0;
	font-weight: 600;
	text-align: right;
	word-break: break-word;
}

.wcpi-ty-total dd {
	color: var(--wcpi-accent);
	font-size: 1.15em;
}

.wcpi-ty-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin: 24px 0 0;
}

.wcpi-ty .wcpi-ty-actions a.wcpi-ty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 190px;
	padding: 14px 28px;
	border: 2px solid transparent;
	border-radius: 999px;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

.wcpi-ty .wcpi-ty-actions a.wcpi-ty-btn:focus-visible {
	outline: 3px solid #93c5fd;
	outline-offset: 3px;
}

.wcpi-ty .wcpi-ty-actions a.wcpi-ty-primary {
	background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
	color: #fff;
	box-shadow: 0 6px 16px rgba(22, 163, 74, .35);
}

.wcpi-ty .wcpi-ty-actions a.wcpi-ty-primary:hover {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 10px 22px rgba(22, 163, 74, .45);
}

.wcpi-ty .wcpi-ty-actions a.wcpi-ty-primary:hover .wcpi-ty-arrow {
	transform: translateX(4px);
}

.wcpi-ty-arrow {
	transition: transform .18s ease;
}

.wcpi-ty .wcpi-ty-actions a.wcpi-ty-secondary {
	background: #fff;
	color: #1f2937;
	border-color: #d1d5db;
}

.wcpi-ty .wcpi-ty-actions a.wcpi-ty-secondary:hover {
	color: #15803d;
	border-color: #16a34a;
	background: #f0fdf4;
	transform: translateY(-2px);
}

.wcpi-ty .wcpi-ty-actions a.wcpi-ty-btn:active {
	transform: translateY(0);
}

@media (max-width: 480px) {
	.wcpi-ty .wcpi-ty-actions a.wcpi-ty-btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wcpi-ty .wcpi-ty-actions a.wcpi-ty-btn,
	.wcpi-ty-arrow {
		transition: none;
	}
}

@media (max-width: 640px) {
	.wcpi-ty-steps {
		grid-template-columns: 1fr;
	}

	.wcpi-ty-hero {
		padding: 32px 16px 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wcpi-ty-check-circle,
	.wcpi-ty-check-mark {
		animation: none;
		stroke-dashoffset: 0;
	}

	.wcpi-ty-confetti {
		display: none;
	}
}
