/* EX Woo Addons — product page.
 * Kept neutral so it inherits the theme's fonts and colours.
 * Override the --exwa-* variables in your theme to restyle.
 */
.exwa-wrap {
	--exwa-border: #dcdcde;
	--exwa-border-strong: #b5b5b8;
	--exwa-bg: #fff;
	--exwa-muted: #6b6b70;
	--exwa-accent: #2a6fdb;
	--exwa-error: #c62828;
	--exwa-radius: 6px;
	margin: 0 0 1.25em;
	width: 100%;
}
.exwa-group + .exwa-group { margin-top: 1.25em; }
.exwa-group-title { margin: 0 0 .75em; font-size: 1.05em; }

.exwa-field { margin: 0 0 1em; }
.exwa-label { display: block; margin: 0 0 .4em; line-height: 1.35; font-weight: 500; }
.exwa-label abbr.required { color: var(--exwa-error); text-decoration: none; border: 0; }
.exwa-price-hint { color: var(--exwa-muted); font-weight: 400; }

/* Label left, field right */
.exwa-layout-inline .exwa-field {
	display: grid;
	grid-template-columns: minmax(110px, 36%) 1fr;
	gap: .75em;
	align-items: center;
}
.exwa-layout-inline .exwa-label { margin: 0; }
.exwa-layout-inline .exwa-type-radio,
.exwa-layout-inline .exwa-type-checkbox,
.exwa-layout-inline .exwa-type-textarea { align-items: start; }
@media (max-width: 480px) {
	.exwa-layout-inline .exwa-field { grid-template-columns: 1fr; gap: .4em; }
}

.exwa-control select,
.exwa-control input[type="text"],
.exwa-control textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	min-height: 46px;
	padding: .55em .8em;
	border: 1px solid var(--exwa-border);
	border-radius: var(--exwa-radius);
	background-color: var(--exwa-bg);
	font: inherit;
	color: inherit;
}
.exwa-control textarea { min-height: 90px; resize: vertical; }
.exwa-control .exwa-datepicker { cursor: pointer; }
.exwa-control select:focus,
.exwa-control input:focus,
.exwa-control textarea:focus {
	outline: none;
	border-color: var(--exwa-accent);
	box-shadow: 0 0 0 2px rgba(42, 111, 219, .2);
}

/* Date + time side by side */
.exwa-dt { display: grid; grid-template-columns: 1.4fr 1fr; gap: .6em; }
@media (max-width: 480px) { .exwa-dt { grid-template-columns: 1fr; } }
.exwa-control option:disabled { color: #b0b0b5; }

/* Measurement */
.exwa-measure { display: grid; grid-template-columns: 1fr auto 1fr 0.8fr; gap: .5em; align-items: end; }
.exwa-measure.is-length { grid-template-columns: 2fr 1fr; }
.exwa-m-box { display: flex; flex-direction: column; gap: .25em; margin: 0; font-size: .85em; color: var(--exwa-muted); }
.exwa-m-box input, .exwa-m-box select { font-size: 1.15em; color: var(--exwa-text, inherit); }
.exwa-control .exwa-m-box input[type="number"] {
	width: 100%; box-sizing: border-box; min-height: 46px; padding: .55em .8em;
	border: 1px solid var(--exwa-border); border-radius: var(--exwa-radius); background: var(--exwa-bg); font: inherit; color: inherit;
}
.exwa-m-x { padding-bottom: .7em; color: var(--exwa-muted); }
.exwa-m-unit { display: flex; align-items: center; min-height: 46px; padding: 0 .8em; border: 1px solid var(--exwa-border); border-radius: var(--exwa-radius); background: #f6f7f7; color: inherit; font-size: 1.15em; }
.exwa-m-limits { display: block; margin-top: .35em; color: var(--exwa-muted); font-size: .85em; }
.exwa-m-out { margin-top: .45em; padding: .45em .7em; border-radius: var(--exwa-radius); background: #f5f8fe; font-size: .92em; font-weight: 500; }
.exwa-m-out[hidden] { display: none; }
@media (max-width: 380px) { .exwa-measure { grid-template-columns: 1fr auto 1fr; } .exwa-m-unitbox { grid-column: 1 / -1; } }

/* Image choices (materials etc.) */
.exwa-imgs { display: flex; flex-wrap: wrap; gap: .75em; }
.exwa-img-choice { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3em; width: var(--exwa-img-size, 90px); margin: 0; cursor: pointer; text-align: center; line-height: 1.25; }
.exwa-img-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.exwa-img-frame {
	position: relative; display: block; width: var(--exwa-img-size, 90px); height: var(--exwa-img-size, 90px);
	border-radius: var(--exwa-img-radius, 8px); overflow: hidden; background: #f3f3f4;
	box-shadow: 0 0 0 1px var(--exwa-border); transition: box-shadow .15s ease, transform .15s ease;
}
.exwa-img-frame img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; }
.exwa-imgs.fit-contain .exwa-img-frame img { object-fit: contain; padding: 4px; box-sizing: border-box; }
.exwa-img-ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 1.6em; font-weight: 600; color: var(--exwa-muted); }
.exwa-img-choice:hover .exwa-img-frame { box-shadow: 0 0 0 1px var(--exwa-border-strong); }
.exwa-img-choice input:checked + .exwa-img-frame { box-shadow: 0 0 0 var(--exwa-img-border, 2px) var(--exwa-accent); }
.exwa-img-choice input:focus-visible + .exwa-img-frame { outline: 2px solid var(--exwa-accent); outline-offset: 3px; }
.exwa-img-tick {
	position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%;
	background: var(--exwa-accent); opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .15s ease;
}
.exwa-img-tick::after { content: ""; position: absolute; left: 7px; top: 3.5px; width: 4px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.exwa-img-choice input:checked + .exwa-img-frame .exwa-img-tick { opacity: 1; transform: scale(1); }
.exwa-img-label { font-size: .88em; word-break: break-word; }
.exwa-img-price { font-size: .8em; color: var(--exwa-muted); }
.exwa-has-error .exwa-img-frame { box-shadow: 0 0 0 1px var(--exwa-error); }
.exwa-layout-inline .exwa-type-image { align-items: start; }

/* Radio / checkbox choices as one stacked list */
.exwa-choices {
	border: 1px solid var(--exwa-border);
	border-radius: var(--exwa-radius);
	overflow: hidden;
	background: var(--exwa-bg);
}
.exwa-choice {
	display: flex;
	align-items: center;
	gap: .8em;
	padding: .95em 1.1em;
	margin: 0;
	cursor: pointer;
	line-height: 1.3;
}
.exwa-choice + .exwa-choice { border-top: 1px solid var(--exwa-border); }
.exwa-choice:hover { background: #fafafa; }
.exwa-choice input {
	width: 1.15em;
	height: 1.15em;
	margin: 0;
	flex: none;
	accent-color: var(--exwa-accent);
}
.exwa-choice:has(input:checked) { background: #f5f8fe; }
.exwa-choice-text { flex: 1; }
.exwa-choice-price { color: var(--exwa-muted); white-space: nowrap; font-size: .95em; }

.exwa-desc { display: block; margin-top: .35em; color: var(--exwa-muted); font-size: .88em; }
.exwa-error { display: block; color: var(--exwa-error); font-size: .88em; margin-top: .3em; }
.exwa-error:empty { display: none; }
.exwa-has-error select,
.exwa-has-error input[type="text"],
.exwa-has-error textarea,
.exwa-has-error input[type="number"],
.exwa-has-error .exwa-choices { border-color: var(--exwa-error); }

/* Live price summary */
.exwa-totals {
	margin-top: 1em;
	padding: .8em 1em;
	border: 1px dashed var(--exwa-border-strong);
	border-radius: var(--exwa-radius);
	font-size: .95em;
}
.exwa-totals[hidden] { display: none; }
.exwa-totals-row { display: flex; justify-content: space-between; gap: 1em; padding: .15em 0; }
.exwa-totals-row span:first-child { color: var(--exwa-muted); }
.exwa-totals-final { margin-top: .35em; padding-top: .5em; border-top: 1px solid var(--exwa-border); font-weight: 600; }
.exwa-totals-final span:first-child { color: inherit; }

/* Datepicker (jQuery UI ships without CSS on the front end) */
.exwa-dp.ui-datepicker {
	width: 18em;
	padding: .6em;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	z-index: 9999 !important;
	font-size: 14px;
	color: #1d2327;
}
.exwa-dp .ui-datepicker-header { position: relative; padding: .3em 0 .6em; text-align: center; }
.exwa-dp .ui-datepicker-title { font-weight: 600; line-height: 2em; }
.exwa-dp .ui-datepicker-prev,
.exwa-dp .ui-datepicker-next {
	position: absolute; top: .3em; width: 2em; height: 2em; line-height: 2em;
	cursor: pointer; border-radius: 4px; text-align: center; text-decoration: none; color: inherit;
}
.exwa-dp .ui-datepicker-prev { left: 0; }
.exwa-dp .ui-datepicker-next { right: 0; }
.exwa-dp .ui-datepicker-prev span,
.exwa-dp .ui-datepicker-next span { display: none; }
.exwa-dp .ui-datepicker-prev::before { content: "\2039"; font-size: 1.4em; }
.exwa-dp .ui-datepicker-next::before { content: "\203A"; font-size: 1.4em; }
.exwa-dp .ui-datepicker-prev:hover,
.exwa-dp .ui-datepicker-next:hover { background: #f0f0f1; }
.exwa-dp .ui-state-disabled.ui-datepicker-prev,
.exwa-dp .ui-state-disabled.ui-datepicker-next { opacity: .3; cursor: default; }
.exwa-dp table { width: 100%; border-collapse: collapse; margin: 0; border: 0; }
.exwa-dp th { padding: .3em 0; font-weight: 500; font-size: .85em; color: #6b6b70; text-align: center; border: 0; background: none; }
.exwa-dp td { padding: 1px; text-align: center; border: 0; background: none; }
.exwa-dp td a,
.exwa-dp td span { display: block; padding: .45em 0; border-radius: 4px; text-decoration: none; color: inherit; }
.exwa-dp td a:hover { background: #f0f0f1; }
.exwa-dp .ui-datepicker-today a { box-shadow: inset 0 0 0 1px #2a6fdb; }
.exwa-dp .ui-state-active { background: #2a6fdb !important; color: #fff !important; }
.exwa-dp .ui-datepicker-unselectable span { color: #c3c4c7; }
.exwa-dp .ui-datepicker-other-month a { color: #a0a0a5; }
.exwa-layout-inline .exwa-type-measure { align-items: start; }
.exwa-layout-inline .exwa-type-measure > .exwa-label { padding-top: 1.6em; }
@media (max-width: 480px) { .exwa-layout-inline .exwa-type-measure > .exwa-label { padding-top: 0; } }

/* Customer image upload */
.exwa-layout-inline .exwa-type-upload { align-items: start; }
.exwa-layout-inline .exwa-type-upload > .exwa-label { padding-top: .9em; }
.exwa-up-drop {
	padding: 1em; border: 1.5px dashed var(--exwa-border-strong); border-radius: var(--exwa-radius);
	background: var(--exwa-bg); transition: border-color .15s ease, background-color .15s ease;
}
.exwa-up-drop.is-over { border-color: var(--exwa-accent); background: #f5f8fe; }
.exwa-up-drop[hidden], .exwa-up-preview[hidden], .exwa-up-bar[hidden] { display: none; }
.exwa-up-actions { display: flex; flex-wrap: wrap; gap: .6em; }
.exwa-up-btn {
	flex: 1 1 140px; display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 46px; padding: .55em 1em; margin: 0;
	border: 1px solid var(--exwa-border-strong); border-radius: var(--exwa-radius);
	background: var(--exwa-bg); color: inherit; font: inherit; font-weight: 500; line-height: 1.2; cursor: pointer;
	text-transform: none; letter-spacing: normal; box-shadow: none;
}
.exwa-up-btn:hover { border-color: var(--exwa-accent); color: var(--exwa-accent); background: var(--exwa-bg); }
.exwa-up-btn:focus-visible { outline: 2px solid var(--exwa-accent); outline-offset: 2px; }
.exwa-up-btn svg { flex: none; }
.exwa-up-hint { display: block; margin-top: .6em; color: var(--exwa-muted); font-size: .85em; text-align: center; }

.exwa-up-preview {
	display: flex; gap: .9em; align-items: center; padding: .7em;
	border: 1px solid var(--exwa-border); border-radius: var(--exwa-radius); background: var(--exwa-bg);
}
.exwa-up-thumb { flex: none; width: 72px; height: 72px; object-fit: cover; border-radius: calc(var(--exwa-radius) - 2px); background: #f3f3f4; margin: 0; }
.exwa-up-meta { display: flex; flex-direction: column; gap: .2em; min-width: 0; flex: 1; }
.exwa-up-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exwa-up-info { color: var(--exwa-muted); font-size: .85em; }
.exwa-up-bar { display: block; height: 4px; border-radius: 2px; background: var(--exwa-border); overflow: hidden; margin: .2em 0; }
.exwa-up-bar span { display: block; height: 100%; width: 0; background: var(--exwa-accent); transition: width .15s linear; }
.exwa-up-links { display: flex; flex-wrap: wrap; gap: .9em; margin-top: .15em; }
.exwa-up-link {
	padding: 0; margin: 0; border: 0; background: none; color: var(--exwa-accent); font: inherit; font-size: .88em;
	cursor: pointer; text-decoration: underline; text-underline-offset: 2px; min-height: 0; box-shadow: none; text-transform: none;
}
.exwa-up-link:hover { background: none; color: var(--exwa-accent); }
.exwa-up-remove { color: var(--exwa-error); }
.exwa-up-remove:hover { color: var(--exwa-error); }
.exwa-upload.is-uploading .exwa-up-links { opacity: .4; pointer-events: none; }
.exwa-has-error .exwa-up-drop { border-color: var(--exwa-error); }

/* Upload shown inside the product image (mockup mode) */
.exwa-mock {
	position: absolute; z-index: 3; pointer-events: none;
	background-size: cover; background-position: center; background-repeat: no-repeat;
}
.exwa-mock.is-behind { z-index: 0; }
img.exwa-over-mock { position: relative; z-index: 1; }

/* Desktop webcam */
.exwa-cam {
	position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center;
	padding: 16px; background: rgba(15, 15, 18, .72);
}
.exwa-cam-box { width: min(720px, 100%); background: #fff; color: #1d2327; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.exwa-cam-head { padding: 12px 16px; font-weight: 600; border-bottom: 1px solid #ececee; }
.exwa-cam-stage { background: #000; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.exwa-cam-stage video, .exwa-cam-stage canvas { display: block; max-width: 100%; max-height: 70vh; width: 100%; height: 100%; object-fit: contain; }
.exwa-cam-stage [hidden] { display: none; }
.exwa-cam-bar { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; }
.exwa-cam-bar [hidden] { display: none; }
.exwa-cam-btn {
	min-height: 40px; padding: .4em 1.1em; border: 1px solid #c3c4c7; border-radius: 6px;
	background: #fff; color: #1d2327; font: inherit; cursor: pointer; text-transform: none;
}
.exwa-cam-btn.is-primary { background: #1d2327; border-color: #1d2327; color: #fff; }
.exwa-cam-btn:focus-visible { outline: 2px solid #2a6fdb; outline-offset: 2px; }
.exwa-cam-cancel { margin-right: auto; }

@media (prefers-reduced-motion: reduce) {
	.exwa-up-bar span, .exwa-up-drop { transition: none; }
}

/* Measurement rate as price (₹109 ₹99/sq.ft.) */
.exwa-rate-price del, .exwa-rate-hint del { opacity: .6; margin-right: .3em; }
.exwa-rate-price ins, .exwa-rate-hint ins { text-decoration: none; }
.exwa-rate-per { font-size: .85em; }
.exwa-rate-off { display: inline-block; margin-left: .4em; padding: .1em .45em; border-radius: 3px; background: #e7f6ec; color: #1a7f37; font-size: .75em; font-weight: 600; vertical-align: middle; }
.exwa-rate-hint { margin-left: .35em; font-weight: 400; }
