/* Krishgen additions: messages box, quote form, sample form, exit popup.
   Colours follow the product-card palette already used in the child theme
   (#ef2a24 red, #222 text). Change the two variables if the brand palette differs. */

:root {
	--kg-accent: #ef2a24;
	--kg-text: #222;
}

/* Honeypot fields: hidden from people, visible to bots */
.kg-hp {
	position: absolute !important;
	left: -9999px !important;
	height: 0;
	overflow: hidden;
}

/* Shipping / lead time / volume pricing */
.kg-msgs {
	border: 1px solid #e5e5e5;
	border-left: 4px solid var(--kg-accent);
	background: #fafafa;
	padding: 12px 16px;
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.5;
}
.kg-msgs-list { list-style: none; margin: 0; padding: 0; }
.kg-msgs-list li { margin: 0 0 6px; }
.kg-msgs-list li:last-child { margin-bottom: 0; }
.kg-msgs--product { margin-top: 16px; }

/* Hide the coupon prompts on checkout (classic bar and block panel). Codes are applied
   by the emailed / popup link. Delete this rule if you want the coupon box on checkout. */
body.woocommerce-checkout .woocommerce-form-coupon-toggle,
body.woocommerce-checkout .checkout_coupon,
.wp-block-woocommerce-checkout .wc-block-components-totals-coupon {
	display: none !important;
}

.kg-notice--info { background: #eef3fb; border: 1px solid #c3d3ee; }
.kg-quote-wrap { max-width: 1200px; margin: 24px auto; padding: 0 16px; }

/* Request a quote (cart and checkout) */
.kg-quote-wrap.is-docked { max-width: none; margin: 16px 0 0; padding: 0; }

.kg-quote-card {
	background: #fff;
	border: 1px solid #e3e3e3;
	border-left: 4px solid var(--kg-accent);
	border-radius: 8px;
	padding: 16px 18px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.kg-quote-card__title { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--kg-text); }
.kg-quote-card__text { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: #555; }
.kg-quote-card__btn {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	width: 100%; box-sizing: border-box; padding: 12px 14px;
	background: #fff; color: var(--kg-accent) !important;
	border: 2px solid var(--kg-accent); border-radius: 6px;
	font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer;
	transition: background .2s ease, color .2s ease;
}
.kg-quote-card__btn:hover,
.kg-quote-card__btn:focus-visible { background: var(--kg-accent); color: #fff !important; }

/* Quote popup. Opens through .is-open (JS) or :target (no-JS link). */
.kg-quote-modal {
	display: none; position: fixed; inset: 0; z-index: 99999;
	background: rgba(0, 0, 0, .55); padding: 16px; overflow-y: auto;
	align-items: center; justify-content: center;
}
.kg-quote-modal.is-open,
.kg-quote-modal:target { display: flex; }
body.kg-modal-open { overflow: hidden; }
.kg-quote-dialog {
	position: relative; box-sizing: border-box; width: 100%; max-width: 580px;
	max-height: calc(100vh - 32px); overflow-y: auto;
	background: #fff; color: var(--kg-text); border-radius: 10px;
	padding: 28px 26px 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.kg-quote-dialog h2 { margin: 0 0 14px; font-size: 22px; line-height: 1.25; }
.kg-quote-close {
	position: absolute; top: 8px; right: 14px; font-size: 30px; line-height: 1;
	color: #666 !important; text-decoration: none;
}
.kg-quote-items { background: #fafafa; border: 1px solid #eee; border-radius: 6px; padding: 10px 14px; margin: 0 0 16px; font-size: 14px; }
.kg-quote-items ul { margin: 6px 0 0; padding-left: 18px; }
.kg-quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.kg-quote-grid p { margin: 0 0 12px; }
.kg-quote-full { grid-column: 1 / -1; }
.kg-quote-grid label { display: block; font-size: 13px; font-weight: 600; }
.kg-quote-grid input,
.kg-quote-grid textarea {
	display: block; width: 100%; box-sizing: border-box; margin-top: 4px;
	padding: 10px 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 15px; font-weight: 400;
}
.kg-quote-grid input:focus,
.kg-quote-grid textarea:focus { outline: 2px solid var(--kg-accent); outline-offset: 1px; }
.kg-quote-submit {
	display: block; width: 100%; padding: 13px 14px; border: 0; border-radius: 6px;
	background: var(--kg-accent); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
}
.kg-quote-submit:hover { background: #b40000; }
@media (max-width: 560px) {
	.kg-quote-grid { grid-template-columns: 1fr; }
	.kg-quote-dialog { padding: 24px 18px 20px; }
}

/* Free sample form */
.kg-sample { max-width: 620px; }
.kg-sample input[type="text"],
.kg-sample input[type="email"],
.kg-sample input[type="tel"],
.kg-sample select,
.kg-sample textarea { width: 100%; }
.kg-notice { padding: 12px 16px; border-radius: 6px; margin: 0 0 16px; }
.kg-notice--success { background: #eaf7ee; border: 1px solid #b7e0c2; }
.kg-notice--error { background: #fdecec; border: 1px solid #f3b9b7; }
.kg-sample-cta { margin-top: 12px; }

/* Thank-you popup (crimson brand tones, no pink) */
.kg-popup-backdrop {
	position: fixed; inset: 0; z-index: 99999;
	background: rgba(20, 20, 20, .55);
	display: flex; align-items: center; justify-content: center;
	padding: 16px; animation: kg-fade .25s ease both;
}
.kg-popup {
	position: relative; width: 100%; max-width: 460px; box-sizing: border-box;
	background: #fff; color: var(--kg-text); text-align: center;
	border-radius: 14px; overflow: hidden; outline: 0;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
	animation: kg-pop .35s cubic-bezier(.2, .9, .3, 1.15) both;
}
.kg-popup__hero {
	position: relative; overflow: hidden; color: #fff;
	padding: 30px 24px 24px;
	background: linear-gradient(135deg, #a80000 0%, #d4140f 55%, #ef2a24 100%);
}
.kg-popup__hero::before,
.kg-popup__hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(0, 0, 0, .10); }
.kg-popup__hero::before { width: 190px; height: 190px; top: -80px; left: -70px; }
.kg-popup__hero::after { width: 150px; height: 150px; bottom: -70px; right: -50px; }
.kg-popup__badge {
	position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
	width: 112px; height: 112px; border-radius: 50%; background: #fff; color: #c40d08;
	box-shadow: 0 8px 22px rgba(0, 0, 0, .28), 0 0 0 6px rgba(0, 0, 0, .12);
}
.kg-popup__pct { font-size: 38px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.kg-popup__off { margin-top: 3px; font-size: 13px; font-weight: 700; letter-spacing: .22em; padding-left: .22em; }
.kg-popup .kg-popup__hero h2 {
	position: relative; margin: 18px 0 0; color: #fff;
	font-size: 22px; line-height: 1.25; font-weight: 700;
}
.kg-popup__body { padding: 22px 26px 26px; }
.kg-popup__body p { margin: 0 0 16px; font-size: 15px; line-height: 1.55; color: #444; }
.kg-popup__close {
	position: absolute; top: 10px; right: 10px; z-index: 2; width: 32px; height: 32px; padding: 0;
	border: 0 !important; border-radius: 50%; background: rgba(0, 0, 0, .22) !important; color: #fff !important;
	font-size: 22px; line-height: 1; cursor: pointer; box-shadow: none !important;
}
.kg-popup__close:hover { background: rgba(0, 0, 0, .38) !important; }
.kg-popup__btn {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	width: 100%; box-sizing: border-box; margin: 0 0 10px; padding: 14px 16px;
	background: var(--kg-accent); color: #fff !important;
	border: 0 !important; outline: 0 !important; border-radius: 8px;
	box-shadow: 0 6px 16px rgba(239, 42, 36, .32) !important;
	font-size: 16px; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer;
	transition: transform .15s ease, background .2s ease;
}
.kg-popup__btn:hover { background: #c40d08; color: #fff !important; transform: translateY(-1px); }
.kg-popup__btn:focus-visible,
.kg-popup__close:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(196, 13, 8, .65) !important; }
.kg-popup__btn:disabled { opacity: .75; cursor: wait; transform: none; }
.kg-popup__btn--ghost {
	background: #fff; color: var(--kg-accent) !important;
	border: 2px solid var(--kg-accent) !important; box-shadow: none !important;
}
.kg-popup__btn--ghost:hover { background: #fff; color: #c40d08 !important; border-color: #c40d08 !important; }
.kg-popup__error { min-height: 1em; margin: 6px 0 0 !important; font-size: 13px !important; color: #b40000 !important; }
.kg-popup__ticket {
	margin: 0 0 14px; padding: 16px 12px; border: 2px dashed var(--kg-accent);
	border-radius: 10px; background: #fafafa;
}
.kg-popup__code {
	font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 26px; font-weight: 800;
	letter-spacing: .1em; color: #222; user-select: all; word-break: break-all;
}
@keyframes kg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kg-pop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
	.kg-popup-backdrop, .kg-popup { animation: none; }
	.kg-popup__btn { transition: none; }
}
