/* Pierides Packaging – Request a Quote. All rules are scoped to .prq-* or quote-mode header elements.
   Values inherit the WoodMart design tokens (--wd-*, --btn-*) so the UI follows the theme settings. */

.prq-quote-mode {
	--prq-primary: var(--wd-primary-color, #142b55);
	--prq-accent: var(--btn-accented-bgcolor, #6f9f3a);
	--prq-accent-hover: var(--btn-accented-bgcolor-hover, #142b55);
	--prq-text: var(--wd-text-color, #333b45);
	--prq-title: var(--wd-title-color, #333b45);
	--prq-border: var(--brdcolor-gray-300, rgba(0, 0, 0, .105));
	--prq-muted: #6b7280;
	--prq-soft: #f6f7f8;
	--prq-error: #c0392b;
	--prq-radius: var(--wd-brd-radius, 0px);
	--prq-btn-radius: var(--btn-accented-brd-radius, 0px);
	--prq-field-radius: var(--wd-form-brd-radius, 0px);
	--prq-field-h: var(--wd-form-height, 42px);
}

/* ---------- Header: quote icon replaces the cart icon ---------- */
.prq-header-quote .wd-tools-icon:before,
.prq-quote-mode .wd-header-cart .wd-tools-icon:before {
	content: "" !important;
	display: inline-block;
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='1.5'/%3E%3Cpath d='M9 4V3h6v1.8H9z'/%3E%3Cpath d='M8.5 12.5l2.2 2.2 4.8-4.8'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='1.5'/%3E%3Cpath d='M9 4V3h6v1.8H9z'/%3E%3Cpath d='M8.5 12.5l2.2 2.2 4.8-4.8'/%3E%3C/svg%3E") center / contain no-repeat;
	font-family: inherit !important;
	vertical-align: middle;
}
.prq-quote-mode .wd-header-cart .wd-cart-subtotal,
.prq-quote-mode .cart-widget-side,
.prq-quote-mode .wd-close-side.wd-location-header ~ .cart-widget-side,
.prq-quote-mode .wd-buy-now-btn,
.prq-quote-mode .product-labels .onsale,
.prq-quote-mode .woocommerce-variation-price,
.prq-quote-mode .wd-sticky-btn .price,
.prq-quote-mode .prq-hp {
	display: none !important;
}
.prq-quote-mode .prq-hp { position: absolute !important; left: -9999px !important; }

/* ---------- Buttons ---------- */
.prq-btn,
.prq-quote-mode a.prq-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--prq-field-h);
	padding: 5px 22px;
	border: 1px solid transparent;
	border-radius: var(--prq-btn-radius);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: .3px;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.prq-btn-primary,
.prq-quote-mode a.prq-btn-primary { background: var(--prq-accent); color: #fff; }
.prq-btn-primary:hover, .prq-btn-primary:focus-visible,
.prq-quote-mode a.prq-btn-primary:hover { background: var(--prq-accent-hover); color: #fff; }
.prq-btn-secondary,
.prq-quote-mode a.prq-btn-secondary { background: transparent; color: var(--prq-primary); border-color: var(--prq-primary); }
.prq-btn-secondary:hover, .prq-btn-secondary:focus-visible,
.prq-quote-mode a.prq-btn-secondary:hover { background: var(--prq-primary); color: #fff; }
.prq-btn:focus-visible, .prq-qty-btn:focus-visible, .prq-remove:focus-visible, .prq-link-btn:focus-visible {
	outline: 2px solid var(--prq-primary);
	outline-offset: 2px;
}

/* Loading state for Add to Quote / Submit */
.prq-quote-mode .prq-loading { position: relative; pointer-events: none; opacity: .85; }
.prq-quote-mode .prq-btn.prq-loading:after,
.prq-quote-mode .single_add_to_cart_button.prq-loading:after,
.prq-quote-mode .prq-add-to-quote.prq-loading:after {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 8px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	vertical-align: -2px;
	animation: prq-spin .7s linear infinite;
}
@keyframes prq-spin { to { transform: rotate(360deg); } }
/* Loop buttons reuse WoodMart's own slide-in icon + spinner (.loading); only swap the cart glyph for a quote glyph. */
.prq-quote-mode .wd-add-btn .prq-add-to-quote.prq-loading:after { content: none; }
.prq-quote-mode .wd-add-btn .prq-add-to-quote:not(.loading):not(.added) .wd-action-icon:before {
	content: "" !important;
	position: absolute;
	inset: 0;
	margin: auto;
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='1.5'/%3E%3Cpath d='M9 4V3h6v1.8H9z'/%3E%3Cpath d='M12 9.5v6M9 12.5h6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='1.5'/%3E%3Cpath d='M9 4V3h6v1.8H9z'/%3E%3Cpath d='M12 9.5v6M9 12.5h6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prq-quote-mode .prq-add-to-quote.prq-unavailable { opacity: .7; }
.prq-quote-mode select.prq-invalid { border-color: var(--prq-error) !important; }

/* ---------- Toast notification ---------- */
.prq-toast {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 100000;
	width: 380px;
	max-width: calc(100vw - 32px);
	padding: 16px 18px;
	background: #fff;
	border: 1px solid var(--prq-border);
	border-left: 3px solid var(--prq-accent);
	border-radius: var(--prq-radius);
	box-shadow: 0 8px 24px rgba(20, 43, 85, .12);
	color: var(--prq-text);
	font-size: 14px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.prq-toast.is-visible { opacity: 1; visibility: visible; transform: none; }
.prq-toast-error { border-left-color: var(--prq-error); }
.prq-toast-msg { display: flex; align-items: flex-start; gap: 10px; }
.prq-toast-msg p { flex: 1; margin: 0; line-height: 1.45; font-weight: 500; color: var(--prq-title); }
.prq-toast-icon {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--prq-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.prq-toast-error .prq-toast-icon {
	background: var(--prq-error) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M10 5.5v5.5M10 14.3v.2'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.prq-toast-close {
	flex: 0 0 auto;
	width: 28px; height: 28px;
	margin: -4px -6px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--prq-muted);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	min-height: 0;
}
.prq-toast-close:hover { color: var(--prq-title); background: none; }
.prq-toast-actions { display: flex; gap: 8px; margin-top: 14px; }
.prq-toast-actions .prq-btn { flex: 1; min-height: 38px; padding: 5px 12px; font-size: 12px; }

/* ---------- Quote page ---------- */
.prq-page { color: var(--prq-text); margin: 10px 0 40px; }
.prq-page *, .prq-page *:before, .prq-page *:after { box-sizing: border-box; }
.prq-grid { display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); gap: 40px; align-items: start; }
.prq-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--prq-border); }
.prq-section-title { margin: 0; font-size: 20px; font-weight: 600; color: var(--prq-title); line-height: 1.3; }
.prq-count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; margin-left: 6px; padding: 0 7px; border-radius: 12px; background: var(--prq-primary); color: #fff; font-size: 12px; font-weight: 600; vertical-align: 3px; }
.prq-link-btn { min-height: 0; padding: 4px 0; border: 0; background: none; color: var(--prq-muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-transform: none; font-weight: 400; }
.prq-link-btn:hover { color: var(--prq-error); background: none; }

.prq-items { list-style: none; margin: 0; padding: 0; }
.prq-item { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; grid-template-areas: "img info actions" "img err err"; gap: 4px 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--prq-border); transition: opacity .2s ease; margin: 0; }
.prq-item.prq-busy { opacity: .55; pointer-events: none; }
.prq-item.prq-removed { opacity: 0; }
.prq-item-img { grid-area: img; display: block; width: 88px; height: 88px; background: var(--prq-soft); border-radius: var(--prq-radius); overflow: hidden; }
.prq-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prq-item-info { grid-area: info; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.prq-item-name { color: var(--prq-title); font-weight: 600; font-size: 15px; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
.prq-item-name:hover { color: var(--prq-accent); }
.prq-item-meta { font-size: 13px; color: var(--prq-muted); line-height: 1.4; }
.prq-item-meta strong { color: var(--prq-text); font-weight: 600; }
.prq-item-actions { grid-area: actions; display: flex; align-items: center; gap: 14px; }
.prq-item-error { grid-area: err; color: var(--prq-error); font-size: 13px; }

.prq-qty { display: inline-flex; align-items: stretch; height: 42px; border: 1px solid var(--prq-border); border-radius: var(--prq-field-radius); background: #fff; }
.prq-qty-btn { width: 38px; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--prq-title); font-size: 18px; line-height: 1; cursor: pointer; transition: background-color .15s ease; }
.prq-qty-btn:hover { background: var(--prq-soft); color: var(--prq-title); }
.prq-qty .prq-qty-input { width: 64px; height: 100%; min-height: 0; padding: 0 4px; border: 0; border-left: 1px solid var(--prq-border); border-right: 1px solid var(--prq-border); border-radius: 0; text-align: center; font-weight: 600; font-size: 15px; color: var(--prq-title); background: #fff; box-shadow: none; -moz-appearance: textfield; }
.prq-qty .prq-qty-input::-webkit-inner-spin-button, .prq-qty .prq-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.prq-qty .prq-qty-input[aria-invalid="true"] { color: var(--prq-error); }
.prq-remove { display: inline-flex; align-items: center; gap: 4px; min-height: 0; padding: 6px 4px; border: 0; background: none; color: var(--prq-muted); font-size: 13px; cursor: pointer; text-transform: none; font-weight: 400; }
.prq-remove span[aria-hidden] { font-size: 20px; line-height: 1; }
.prq-remove:hover { color: var(--prq-error); background: none; }
.prq-items-foot { margin-top: 22px; }

.prq-form-card { padding: 30px; background: #fff; border: 1px solid var(--prq-border); border-top: 3px solid var(--prq-primary); border-radius: var(--prq-radius); position: sticky; top: 110px; }
.prq-form-intro { margin: 8px 0 22px; font-size: 14px; line-height: 1.6; color: var(--prq-muted); }
.prq-field { margin-bottom: 16px; }
.prq-field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--prq-title); }
.prq-req { color: var(--prq-error); }
.prq-form input[type="text"], .prq-form input[type="email"], .prq-form input[type="tel"], .prq-form textarea {
	width: 100%;
	height: var(--prq-field-h);
	padding: 0 14px;
	border: 1px solid var(--prq-border);
	border-radius: var(--prq-field-radius);
	background: #fff;
	font-size: 14px;
	color: var(--prq-text);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.prq-form textarea { height: auto; min-height: 110px; padding: 10px 14px; resize: vertical; line-height: 1.5; }
.prq-form input:focus, .prq-form textarea:focus { border-color: var(--prq-primary); box-shadow: 0 0 0 2px rgba(20, 43, 85, .1); outline: none; }
.prq-field.has-error input, .prq-field.has-error textarea, .prq-form [aria-invalid="true"] { border-color: var(--prq-error); }
.prq-field-error { display: block; margin-top: 5px; font-size: 13px; color: var(--prq-error); }
.prq-field-check { display: grid; grid-template-columns: 20px 1fr; gap: 0 10px; align-items: start; margin: 6px 0 22px; }
.prq-field-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--prq-accent); cursor: pointer; }
.prq-field-check label { margin: 0; font-weight: 400; font-size: 13px; line-height: 1.55; color: var(--prq-text); cursor: pointer; }
.prq-field-check label a { color: var(--prq-primary); text-decoration: underline; }
.prq-field-check .prq-field-error { grid-column: 2; }
.prq-submit { width: 100%; min-height: 48px; font-size: 14px; }
.prq-submit[disabled] { cursor: progress; }
.prq-alert { margin: 0 0 18px; padding: 12px 14px; font-size: 14px; line-height: 1.5; border-radius: var(--prq-radius); }
.prq-alert-error { background: #fdf1f0; color: var(--prq-error); border-left: 3px solid var(--prq-error); }

.prq-empty, .prq-success { max-width: 620px; margin: 30px auto; padding: 50px 30px; text-align: center; border: 1px solid var(--prq-border); border-radius: var(--prq-radius); background: #fff; }
.prq-success:focus { outline: none; }
.prq-empty-title, .prq-success-title { margin: 16px 0 10px; font-size: 24px; font-weight: 600; color: var(--prq-title); }
.prq-empty p, .prq-success p { margin: 0 auto 22px; max-width: 480px; line-height: 1.65; color: var(--prq-muted); }
.prq-success-ref { font-size: 15px; color: var(--prq-text) !important; }
.prq-success-ref strong { color: var(--prq-primary); font-size: 17px; letter-spacing: .5px; }
.prq-empty-icon, .prq-success-icon { display: inline-block; width: 64px; height: 64px; border-radius: 50%; background-color: var(--prq-soft); background-position: center; background-repeat: no-repeat; background-size: 30px; }
.prq-empty-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23142b55' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='1.5'/%3E%3Cpath d='M9 4V3h6v1.8H9zM8.5 10h7M8.5 13.5h7M8.5 17h4'/%3E%3C/svg%3E"); }
.prq-success-icon { background-color: var(--prq-accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E"); }

@media (max-width: 1024px) {
	.prq-grid { gap: 28px; grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); }
	.prq-form-card { padding: 24px; }
	.prq-item { grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "img info" "img actions" "err err"; gap: 10px 14px; }
	.prq-item-img { width: 72px; height: 72px; }
}
@media (max-width: 768px) {
	.prq-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
	.prq-form-card { position: static; padding: 22px 18px; }
	.prq-section-title { font-size: 18px; }
	.prq-items-foot .prq-btn { width: 100%; }
	.prq-toast { left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: auto; max-width: none; }
	.prq-quote-mode.sticky-toolbar-on .prq-toast { bottom: calc(70px + env(safe-area-inset-bottom)); }
	.prq-empty, .prq-success { padding: 36px 18px; margin: 10px 0; }
	.prq-form input[type="text"], .prq-form input[type="email"], .prq-form input[type="tel"], .prq-form textarea { font-size: 16px; } /* prevents iOS zoom */
}
@media (max-width: 380px) {
	.prq-item { grid-template-columns: 60px minmax(0, 1fr); gap: 10px 12px; }
	.prq-item-img { width: 60px; height: 60px; }
	.prq-item-actions { gap: 8px; flex-wrap: wrap; }
	.prq-qty .prq-qty-input { width: 52px; }
	.prq-remove-text { display: none; }
	.prq-remove span[aria-hidden] { font-size: 24px; padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) {
	.prq-toast, .prq-item, .prq-btn { transition: none; }
}
@media print {
	.prq-toast { display: none !important; }
}

/* ---------- Specificity guard: WoodMart styles every <button> (grey default background, padding, min-height,
   capitalize). These rules restore the quote UI's own button styles. ---------- */
.prq-quote-mode .prq-page button.prq-qty-btn,
.prq-quote-mode .prq-page button.prq-remove,
.prq-quote-mode .prq-page button.prq-link-btn,
.prq-quote-mode .prq-toast button.prq-toast-close {
	min-height: 0;
	background: transparent;
	box-shadow: none;
	text-transform: none;
	letter-spacing: 0;
	border-radius: 0;
}
.prq-quote-mode .prq-page button.prq-qty-btn { padding: 0; font-size: 18px; color: var(--prq-title); }
.prq-quote-mode .prq-page button.prq-qty-btn:hover { background: var(--prq-soft); color: var(--prq-title); }
.prq-quote-mode .prq-page button.prq-remove { padding: 6px 4px; font-size: 13px; font-weight: 400; color: var(--prq-muted); }
.prq-quote-mode .prq-page button.prq-remove:hover { color: var(--prq-error); background: transparent; }
.prq-quote-mode .prq-page button.prq-link-btn { padding: 4px 0; font-size: 13px; font-weight: 400; color: var(--prq-muted); text-decoration: underline; }
.prq-quote-mode .prq-page button.prq-link-btn:hover { color: var(--prq-error); background: transparent; }
.prq-quote-mode .prq-toast button.prq-toast-close { padding: 0; font-size: 22px; color: var(--prq-muted); }
.prq-quote-mode .prq-toast button.prq-toast-close:hover { color: var(--prq-title); background: transparent; }
.prq-quote-mode .prq-page .prq-btn,
.prq-quote-mode .prq-toast .prq-btn { text-transform: uppercase; font-size: 13px; font-weight: 600; letter-spacing: .3px; }
.prq-quote-mode .prq-toast .prq-btn { font-size: 12px; }
.prq-quote-mode .prq-page .prq-btn-secondary,
.prq-quote-mode .prq-toast .prq-btn-secondary { background: transparent; color: var(--prq-primary); border: 1px solid var(--prq-primary); box-shadow: none; }
.prq-quote-mode .prq-page .prq-btn-secondary:hover,
.prq-quote-mode .prq-toast .prq-btn-secondary:hover { background: var(--prq-primary); color: #fff; }
.prq-quote-mode .prq-page .prq-btn-primary,
.prq-quote-mode .prq-toast .prq-btn-primary { background: var(--prq-accent); color: #fff; border: 1px solid transparent; }
.prq-quote-mode .prq-page .prq-btn-primary:hover,
.prq-quote-mode .prq-toast .prq-btn-primary:hover { background: var(--prq-accent-hover); color: #fff; }
.prq-quote-mode .prq-page button.prq-submit { width: 100%; min-height: 48px; font-size: 14px; }
