/* ---------- Buttons on product page ---------- */

.wls-buttons {
	display: flex;
	gap: 12px;
	margin: 16px 0;
	flex-wrap: wrap;
}

.wls-btn {
	padding: 13px 26px;
	font-size: 15px;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	border: 1.5px solid #16181c;
	transition: transform 0.12s ease, opacity 0.12s ease;
}

.wls-btn:hover {
	transform: translateY(-1px);
}

.wls-btn:focus-visible {
	outline: 2px solid #16181c;
	outline-offset: 2px;
}

.wls-btn:disabled {
	cursor: not-allowed;
	transform: none;
	opacity: 0.55;
}

.wls-btn-primary {
	background: #16181c;
	color: #fff;
}

.wls-btn-secondary {
	background: transparent;
	color: #16181c;
}

.wls-buttons #wls-open-lenses {
	background: #ff2e9a;
	border-color: #ff2e9a;
	color: #fff;
}

.wls-buttons #wls-frame-only {
	background: #4dfff0;
	border-color: #4dfff0;
	color: #fff;
}

.wls-buttons #wls-open-try-on {
	background: #fff;
	border-color: #16181c;
	color: #16181c;
}

/* Mobile: Select Lenses / Frame Only sit side by side at 50% each, Try On
   drops to its own full-width row below -- the flex-wrap on .wls-buttons
   (declared above) is what lets the third button wrap onto that new row
   once the first two fill it; `gap` already spaces that wrapped row the
   same as the horizontal gap between the first two. */
@media ( max-width: 480px ) {
	.wls-buttons {
		justify-content: center;
	}

	.wls-buttons #wls-open-lenses,
	.wls-buttons #wls-frame-only {
		flex: 1 1 calc( 50% - 6px );
	}

	.wls-buttons #wls-open-try-on {
		flex: 1 1 100%;
	}
}

/* ---------- Modal shell ---------- */

.wls-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483647 !important; /* max valid z-index -- the theme's footer/header was overlapping it otherwise */
	background: rgba( 20, 18, 16, 0.55 );
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.wls-modal[hidden] {
	display: none;
}

.wls-modal-inner {
	background: #fff;
	width: 100%;
	max-width: 1100px;
	max-height: 90vh;
	border-radius: 16px;
	overflow: hidden;
	display: grid;
	grid-template-columns: 1fr 1fr;
	box-shadow: 0 30px 80px rgba( 0, 0, 0, 0.35 );
}

.wls-panel {
	padding: 56px 48px;
	overflow-y: auto;
	max-height: 90vh;
}

/* ---------- Left: product summary ---------- */

.wls-panel-summary {
	background: #ffffff;
	display: flex;
	flex-direction: column;
}

.wls-summary-content {
	max-width: 380px;
	margin: 0 auto;
	width: 100%;
}

.wls-product-image {
	width: 100%;
	max-width: 420px;
	display: block;
	margin: 0 auto 28px;
}

.wls-product-title {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 28px;
	color: #16181c;
}

.wls-summary-rows {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.wls-summary-row {
	display: flex;
	justify-content: space-between;
	font-size: 15px;
	color: #16181c;
}

.wls-summary-row span:first-child {
	font-weight: 600;
}

.wls-summary-divider {
	border: none;
	border-top: 1.5px solid #16181c;
	margin: 220px 0 18px;
}

.wls-summary-total {
	font-size: 17px;
}

.wls-summary-total span {
	font-weight: 700 !important;
}

/* ---------- Right: steps panel ---------- */

.wls-panel-steps {
	background: #f2efe8;
	position: relative;
}

.wls-modal-close {
	position: absolute;
	top: 20px;
	right: 24px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #16181c;
	z-index: 2;
}

.wls-modal-close:focus-visible {
	outline: 2px solid #16181c;
	outline-offset: 2px;
}

.wls-step-scroll {
	max-width: 460px;
	margin: 0 auto;
}

.wls-step[hidden] {
	display: none;
}

.wls-step-heading {
	font-size: 24px;
	font-weight: 700;
	text-align: center;
	margin: 6px 0 10px;
	color: #16181c;
}

.wls-step-subheading {
	font-size: 14.5px;
	text-align: center;
	color: #55524a;
	margin: 0 0 10px;
	line-height: 1.5;
}

.wls-link-btn {
	display: block;
	margin: 0 auto 28px;
	background: none;
	border: none;
	color: #16181c;
	text-decoration: underline;
	font-size: 14px;
	cursor: pointer;
}

.wls-option-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.wls-option-card {
	display: flex;
	align-items: center;
	gap: 16px;
	background: #fff;
	border: none;
	border-radius: 12px;
	padding: 18px 20px;
	text-align: left;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.04 );
	transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.wls-option-card:hover {
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.1 );
	transform: translateY( -1px );
}

.wls-option-card:focus-visible {
	outline: 2px solid #16181c;
	outline-offset: 2px;
}

.wls-option-card.is-selected {
	outline: 2px solid #16181c;
	outline-offset: -2px;
}

.wls-option-icon {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #16181c;
}

.wls-option-icon svg {
	width: 100%;
	height: 100%;
}

.wls-option-text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1 1 auto;
}

.wls-option-title {
	font-weight: 700;
	font-size: 15.5px;
	color: #16181c;
	display: flex;
	align-items: center;
	gap: 6px;
}

.wls-option-desc {
	font-size: 13px;
	color: #6b6860;
	line-height: 1.4;
}

.wls-option-chevron {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	color: #16181c;
	transition: transform 0.15s ease;
}

.wls-option-card.is-expanded .wls-option-chevron {
	transform: rotate( 180deg );
}

.wls-lens-option {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wls-suboption-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-left: 12px;
}

.wls-suboption-list[hidden] {
	display: none;
}

.wls-suboption-card {
	display: flex;
	align-items: center;
	gap: 16px;
	background: #f2efe8;
	border: 1.5px solid transparent;
	border-radius: 12px;
	padding: 16px 18px;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.wls-suboption-card:hover {
	border-color: #cfcabe;
}

.wls-suboption-card:focus-visible {
	outline: 2px solid #16181c;
	outline-offset: 2px;
}

.wls-suboption-card.is-selected {
	border-color: #16181c;
}

.wls-suboption-icon {
	flex: 0 0 auto;
	width: 56px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #16181c;
}

.wls-suboption-icon svg {
	width: 100%;
	height: 100%;
}

/* Placeholder for brand logos (e.g. Transitions(R) wordmarks) until real
   logo images are supplied -- swap for an <img> using the same class. */
.wls-suboption-logo {
	flex: 0 0 auto;
	width: 56px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #e8e5dc;
	border-radius: 6px;
	color: #928f86;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-align: center;
}

.wls-suboption-text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1 1 auto;
}

.wls-suboption-title {
	font-weight: 700;
	font-size: 14.5px;
	color: #16181c;
}

.wls-suboption-desc {
	font-size: 12.5px;
	color: #6b6860;
	line-height: 1.4;
}

/* ---------- Color Tint: grouped swatch picker ---------- */

.wls-tint-groups {
	padding-left: 0;
}

.wls-tint-group {
	background: #f2efe8;
	border: 1.5px solid transparent;
	border-radius: 12px;
	padding: 14px 18px;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.wls-tint-group.has-selection {
	background: #fff0f8;
	border-color: #ff2e9a;
}

.wls-tint-group-header {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin-bottom: 10px;
}

.wls-tint-group-title {
	font-weight: 700;
	font-size: 13.5px;
	color: #16181c;
}

.wls-tint-group-selected {
	font-size: 12.5px;
	color: #6b6860;
}

.wls-tint-swatches {
	display: flex;
	gap: 12px;
}

.wls-tint-swatch {
	width: 36px;
	height: 36px;
	flex: 0 0 auto;
	padding: 0;
	border-radius: 50%;
	border: none;
}

.wls-tint-swatch:hover {
	transform: translateY( -1px );
}

.wls-tint-swatch.is-selected {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ff2e9a;
}

/* ---------- Step 4: lens technology tiers ---------- */

.wls-tier-banner {
	background: #f6f3ec;
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 13px;
	line-height: 1.5;
	color: #55524a;
	text-align: center;
	margin: 0 0 18px;
}

.wls-tier-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.wls-tier-card {
	position: relative;
	display: block;
	width: 100%;
	background: #fff;
	border: 1.5px solid transparent;
	border-radius: 12px;
	padding: 20px;
	text-align: left;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.04 );
	transition: box-shadow 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}

.wls-tier-card:hover {
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.1 );
	transform: translateY( -1px );
}

.wls-tier-card:focus-visible {
	outline: 2px solid #16181c;
	outline-offset: 2px;
}

.wls-tier-card.is-selected {
	border-color: #16181c;
}

.wls-tier-card.is-recommended {
	border-color: #ff2e9a;
}

.wls-tier-badge {
	position: absolute;
	top: -12px;
	right: 16px;
	background: #ff2e9a;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 5px 12px;
	border-radius: 999px;
}

.wls-tier-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.wls-tier-title {
	font-weight: 700;
	font-size: 16px;
	color: #16181c;
}

.wls-tier-price {
	font-weight: 700;
	font-size: 15px;
	color: #16181c;
	white-space: nowrap;
}

.wls-tier-features {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: #16181c;
}

.wls-tier-index em {
	color: #928f86;
	font-style: normal;
	font-weight: 600;
}

.wls-tier-feature {
	position: relative;
	padding-left: 20px;
}

.wls-tier-feature::before {
	content: '\2713';
	position: absolute;
	left: 0;
	color: #1f9d55;
	font-weight: 700;
}

.wls-back-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	color: #16181c;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	margin-bottom: 20px;
	padding: 4px 0;
}

.wls-back-btn svg {
	width: 18px;
	height: 18px;
}

/* ---------- Step 2 header (back icon + centered title) ---------- */

.wls-step-header {
	position: relative;
	margin-bottom: 22px;
}

.wls-back-icon-btn {
	position: absolute;
	left: 0;
	top: 2px;
	background: none;
	border: none;
	cursor: pointer;
	color: #16181c;
	padding: 4px;
	line-height: 0;
}

.wls-back-icon-btn svg {
	width: 22px;
	height: 22px;
}

.wls-step-header .wls-step-heading {
	margin: 0;
}

/* ---------- Sub-step tabs (Manual Input / Upload Prescription) ---------- */

.wls-substep-tabs {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
}

.wls-substep-tab {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	border: 1.5px solid transparent;
	border-radius: 999px;
	padding: 10px 14px;
	font-size: 13.5px;
	font-weight: 600;
	color: #928f86;
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.wls-substep-tab.is-active {
	color: #16181c;
	border-color: #16181c;
}

.wls-substep-icon {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	display: flex;
}

.wls-substep-icon svg {
	width: 100%;
	height: 100%;
}

.wls-substep-tab span:nth-child(2) {
	flex: 1 1 auto;
	text-align: left;
}

.wls-substep-chevron {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
}

/* ---------- Prescription entry card ---------- */

.wls-rx-card {
	background: #fff;
	border-radius: 12px;
	padding: 22px;
	box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.04 );
}

.wls-rx-card-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.wls-rx-card-title {
	font-weight: 700;
	font-size: 15px;
	color: #16181c;
}

.wls-rx-card-header .wls-link-btn {
	margin: 0;
	font-size: 12.5px;
}

.wls-rx-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 18px;
}

.wls-rx-table th,
.wls-rx-table td {
	padding: 8px 6px;
	text-align: center;
	font-size: 13px;
}

.wls-rx-table thead th {
	font-size: 11.5px;
	letter-spacing: 0.03em;
	color: #16181c;
	font-weight: 700;
}

.wls-rx-table tbody th {
	text-align: left;
	font-weight: 700;
	color: #16181c;
	white-space: nowrap;
}

.wls-rx-select,
.wls-rx-input {
	width: 100%;
	padding: 8px 6px;
	border: 1px solid #e3e0d8;
	border-radius: 6px;
	background: #fff;
	font-size: 13px;
	color: #16181c;
}

.wls-rx-select.is-invalid {
	border-color: #c0392b;
}

.wls-rx-axis:disabled {
	background: #f2efe8;
	color: #a8a49a;
	border-color: #e3e0d8;
}

.wls-prism-base {
	background: #f2efe8;
	color: #a8a49a;
	border-color: #e3e0d8;
}

.wls-add-row {
	display: flex;
	align-items: center;
	gap: 20px;
	border: 1px solid #e3e0d8;
	border-radius: 8px;
	padding: 10px 14px;
	margin-bottom: 16px;
}

.wls-add-fields {
	display: flex;
	gap: 20px;
	flex: 1 1 auto;
}

.wls-add-fields > div {
	flex: 1 1 0;
	text-align: center;
}

.wls-add-sublabel {
	display: block;
	font-size: 11.5px;
	color: #928f86;
	margin-bottom: 2px;
}

.wls-pd-block {
	display: flex;
	align-items: center;
	gap: 12px;
	border: 1px solid #e3e0d8;
	border-radius: 8px;
	padding: 10px 14px;
	margin-bottom: 16px;
	max-width: 260px;
}

.wls-pd-block[hidden] {
	display: none;
}

.wls-pd-block-dual {
	max-width: none;
}

.wls-pd-dual-selects {
	display: flex;
	gap: 12px;
	flex: 1 1 auto;
}

.wls-pd-dual-selects select {
	flex: 1 1 0;
}

.wls-pd-label {
	font-weight: 700;
	font-size: 12.5px;
	white-space: nowrap;
}

.wls-checkbox-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13.5px;
	margin-bottom: 10px;
}

.wls-checkbox-row label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.wls-inline-link {
	background: none;
	border: none;
	color: #16181c;
	text-decoration: underline;
	font-size: 13px;
	cursor: pointer;
	padding: 0;
}

.wls-tooltip-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1px solid #928f86;
	color: #928f86;
	font-size: 11px;
	cursor: help;
}

.wls-pd-help {
	font-size: 12.5px;
	color: #6b6860;
	line-height: 1.5;
	margin: -4px 0 14px;
}

.wls-prism-fields {
	margin-bottom: 6px;
}

.wls-prism-table {
	margin-bottom: 0;
}

.wls-rx-divider {
	border: none;
	border-top: 1px solid #ece9e1;
	margin: 18px 0 14px;
}

.wls-disclaimer-note {
	background: #f6f3ec;
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 12.5px;
	line-height: 1.55;
	color: #55524a;
}

.wls-rx-submit {
	width: 100%;
	margin-top: 18px;
	text-align: center;
	justify-content: center;
}

.wls-ai-btn {
	width: 100%;
	margin-top: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: linear-gradient( 90deg, #6a5cf5, #b45cf5 );
	border: none;
	color: #fff;
}

.wls-ai-btn-icon {
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
}

.wls-ai-note {
	font-size: 12px;
	color: #6b6860;
	text-align: center;
	margin: 8px 0 0;
}

.wls-ai-captured-note {
	font-size: 12.5px;
	font-weight: 600;
	color: #1f9d55;
	text-align: center;
	margin: 8px 0 0;
}

/* ---------- AI Optician camera modal ---------- */

.wls-ai-modal {
	z-index: 2147483647 !important;
}

.wls-ai-modal-inner {
	background: #fff;
	width: 100%;
	max-width: 420px;
	max-height: 90vh;
	overflow-y: auto;
	border-radius: 16px;
	padding: 40px 32px 32px;
	position: relative;
	text-align: center;
	box-shadow: 0 30px 80px rgba( 0, 0, 0, 0.35 );
}

/* Makeshift front-camera flash (step 1 only, see wls-ai-optician.js's
   setScreenFlash()) -- a full-viewport white layer, maximizing the screen
   area lit at full brightness as fill light. Comes before
   .wls-ai-modal-inner in the DOM so it paints behind the (opaque) card
   rather than covering it. */
.wls-ai-screen-flash {
	position: fixed;
	inset: 0;
	background: #fff;
	pointer-events: none;
}

.wls-ai-screen-flash[hidden] {
	display: none;
}

.wls-ai-intro {
	padding: 10px 0 4px;
	text-align: center;
}

.wls-ai-intro[hidden] {
	display: none;
}

.wls-ai-intro-icon {
	width: 40px;
	height: 40px;
	color: #6a5cf5;
	margin: 4px 0 14px;
}

.wls-ai-intro .wls-btn {
	width: 100%;
	margin-top: 8px;
}

/* "Taking measurements for..." -- replaces the old runtime flip-camera
   button, see startCaptureFor() in wls-ai-optician.js. */
.wls-ai-who {
	padding: 10px 0 4px;
	text-align: center;
}

.wls-ai-who[hidden] {
	display: none;
}

.wls-ai-who-options {
	display: flex;
	gap: 12px;
	margin-top: 12px;
}

.wls-ai-who-options .wls-btn {
	flex: 1;
}

.wls-ai-step-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-bottom: 14px;
}

.wls-ai-step-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #e3e0d8;
}

.wls-ai-step-dot.is-active {
	background: #16181c;
}

.wls-ai-step-dot.is-done {
	background: #6a5cf5;
}

.wls-ai-camera-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 16px;
	overflow: hidden;
	background: #16181c;
	margin: 18px 0;
}

.wls-ai-camera-wrap[hidden] {
	display: none;
}

.wls-ai-camera-wrap video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scaleX( -1 ); /* front camera: mirrored, selfie-style */
}

/* Back camera is a normal viewfinder, not a mirror -- toggled by
   updateMirrorClass() in wls-ai-optician.js. */
.wls-ai-camera-wrap.wls-ai-back-camera video {
	transform: none;
}

.wls-ai-oval-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.wls-ai-oval {
	width: 70%;
	height: 88%;
	border-radius: 50%;
	border: 3px solid rgba( 255, 255, 255, 0.55 );
	transition: border-color 0.2s ease;
}

.wls-ai-oval.is-good {
	border-color: #3ecf6e;
}

/* Alignment crosshair -- full-overlay "artificial horizon" pair of crosses
   replacing the old corner tilt-bubble + "Move left/up" text: a fixed
   dashed reference cross at the oval's center, and a solid live cross
   positioned by the detected face-center offset and rotated by phone roll,
   updated every gate tick (see updateCrosshair() in wls-ai-optician.js).
   The two visibly merge into a single green cross once centered/level.
   Distance and head pitch/yaw remain status-text-only -- a 2D reticle can't
   show forward/back distance or a head turn/nod, only in-plane position and
   phone roll, so those still fall back to evaluateGate()'s text messages.
   Built from plain divs, not SVG -- see the markup comment in
   print_ai_optician_modal() for why. */
.wls-ai-crosshair {
	position: absolute;
	inset: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.wls-ai-crosshair[hidden] {
	display: none;
}

.wls-ai-crosshair.is-no-face {
	opacity: 0.35;
}

/* box-shadow adds a dark halo behind the white/green bars so the crosshair
   still reads clearly against a bright wall, light skin, or a washed-out
   exposure -- plain translucent white-on-video was proving too low-contrast
   to spot. */
.wls-ai-crosshair-fixed-v,
.wls-ai-crosshair-fixed-h {
	position: absolute;
	background: rgba( 255, 255, 255, 0.65 );
	box-shadow: 0 0 1.5px rgba( 0, 0, 0, 0.8 );
}

.wls-ai-crosshair-fixed-v {
	left: 50%;
	top: 24%;
	bottom: 24%;
	width: 2px;
	margin-left: -1px;
}

.wls-ai-crosshair-fixed-h {
	top: 50%;
	left: 24%;
	right: 24%;
	height: 2px;
	margin-top: -1px;
}

/* Positioned via inline left/top percentages (not transform: translate(),
   which is relative to the element's own -- here zero -- size) and rotated
   via inline transform, both set every tick in updateCrosshair(). */
.wls-ai-crosshair-live {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 0;
	height: 0;
	transition: left 0.1s linear, top 0.1s linear, transform 0.1s linear;
}

.wls-ai-crosshair-live-v,
.wls-ai-crosshair-live-h {
	position: absolute;
	background: rgba( 255, 255, 255, 0.95 );
	box-shadow: 0 0 1.5px rgba( 0, 0, 0, 0.8 );
	border-radius: 2px;
	transition: background 0.2s ease;
}

.wls-ai-crosshair-live-v {
	left: -1.5px;
	top: -15px;
	width: 3px;
	height: 30px;
}

.wls-ai-crosshair-live-h {
	top: -1.5px;
	left: -15px;
	width: 30px;
	height: 3px;
}

.wls-ai-crosshair-live.is-good .wls-ai-crosshair-live-v,
.wls-ai-crosshair-live.is-good .wls-ai-crosshair-live-h {
	background: #3ecf6e;
}

.wls-ai-progress-ring {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 44px;
	height: 44px;
	transform: rotate( -90deg );
}

.wls-ai-progress-ring[hidden] {
	display: none;
}

.wls-ai-progress-ring-track {
	fill: none;
	stroke: rgba( 255, 255, 255, 0.25 );
	stroke-width: 8;
}

.wls-ai-progress-ring-fill {
	fill: none;
	stroke: #3ecf6e;
	stroke-width: 8;
	stroke-linecap: round;
	transition: stroke-dashoffset 0.1s linear;
}

.wls-ai-status {
	font-size: 14px;
	font-weight: 600;
	color: #16181c;
	min-height: 20px;
}

.wls-ai-pause {
	padding: 20px 0;
}

.wls-ai-pause p {
	font-size: 15px;
	font-weight: 600;
	color: #16181c;
	margin: 0 0 18px;
}

.wls-ai-pause .wls-btn {
	width: 100%;
}

.wls-ai-pause .wls-link-btn {
	margin-top: 14px;
	margin-bottom: 0;
}

.wls-ai-success {
	padding: 20px 0;
}

.wls-ai-success svg {
	width: 46px;
	height: 46px;
	color: #3ecf6e;
	margin-bottom: 10px;
}

.wls-ai-success p {
	font-size: 17px;
	font-weight: 700;
	color: #16181c;
}

/* Stacked (not side-by-side) so long snake_case keys/values -- e.g.
   pupil_to_bottom_without_glasses_mm -- always have the full card width to
   wrap into rather than forcing a fixed-width column wider than the card on
   narrow phone screens (a two-column grid did exactly that). */
.wls-ai-debug-list {
	margin: 16px 0;
	padding: 14px 16px;
	background: #f6f3ec;
	border-radius: 8px;
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 12.5px;
	max-width: 100%;
}

.wls-ai-debug-list dt {
	color: #6b6860;
	overflow-wrap: anywhere;
}

.wls-ai-debug-list dd {
	margin: 0;
	font-weight: 700;
	color: #16181c;
	overflow-wrap: anywhere;
}

.wls-ai-error p {
	font-size: 14px;
	color: #55524a;
	margin-bottom: 14px;
}

/* ---------- Try On modal ---------- */

.wls-tryon-modal {
	z-index: 2147483647 !important;
}

.wls-tryon-modal-inner {
	background: #fff;
	width: 100%;
	max-width: 420px;
	max-height: 90vh;
	overflow-y: auto;
	border-radius: 16px;
	padding: 40px 32px 32px;
	position: relative;
	text-align: center;
	box-shadow: 0 30px 80px rgba( 0, 0, 0, 0.35 );
}

.wls-tryon-intro .wls-product-image {
	max-width: 200px;
	margin: 0 auto 18px;
}

.wls-tryon-privacy-note {
	font-size: 12.5px;
	color: #8a8678;
}

.wls-tryon-intro .wls-btn,
.wls-tryon-preview-actions .wls-btn {
	width: 100%;
}

.wls-tryon-result-actions #wls-tryon-download {
	width: 100%;
}

.wls-tryon-camera-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 16px;
	overflow: hidden;
	background: #16181c;
	margin: 18px 0;
}

.wls-tryon-camera-wrap[hidden] {
	display: none;
}

.wls-tryon-camera-wrap video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scaleX( -1 ); /* front camera: mirrored, selfie-style */
}

.wls-tryon-camera-wrap .wls-btn {
	position: absolute;
	left: 50%;
	bottom: 16px;
	transform: translateX( -50% );
}

.wls-tryon-preview[hidden],
.wls-tryon-loading[hidden],
.wls-tryon-result[hidden],
.wls-tryon-error[hidden] {
	display: none;
}

.wls-tryon-preview img,
.wls-tryon-result img {
	width: 100%;
	border-radius: 16px;
	margin: 18px 0;
	display: block;
}

.wls-tryon-preview-actions {
	display: flex;
	gap: 12px;
}

.wls-tryon-result-actions #wls-tryon-download {
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wls-tryon-loading {
	padding: 40px 0;
}

.wls-tryon-loading p {
	font-size: 14.5px;
	color: #55524a;
	margin-top: 16px;
}

.wls-tryon-spinner {
	width: 40px;
	height: 40px;
	margin: 0 auto;
	border: 3px solid #e3e0d8;
	border-top-color: #16181c;
	border-radius: 50%;
	animation: wls-tryon-spin 0.8s linear infinite;
}

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

.wls-tryon-error p {
	font-size: 14px;
	color: #55524a;
	margin-bottom: 14px;
}

/* ---------- Upload sub-step ---------- */

.wls-upload-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border: 1.5px dashed #cfcabe;
	border-radius: 10px;
	padding: 40px 20px;
	text-align: center;
	cursor: pointer;
	color: #55524a;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.wls-upload-dropzone:hover {
	border-color: #16181c;
	background: #faf9f5;
}

.wls-upload-dropzone svg {
	width: 30px;
	height: 30px;
	color: #16181c;
}

.wls-upload-dropzone p {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #16181c;
}

.wls-upload-filename {
	font-size: 12.5px;
	color: #6b6860;
}

.wls-mag-grid {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 14px;
}

.wls-mag-option {
	background: #fff;
	border: 1.5px solid #cfcabe;
	border-radius: 10px;
	padding: 14px 8px;
	font-size: 15px;
	font-weight: 600;
	color: #16181c;
	cursor: pointer;
	text-align: center;
	transition: border-color 0.12s ease, background 0.12s ease;
}

.wls-mag-option:hover {
	border-color: #16181c;
}

.wls-mag-option.is-selected {
	background: #16181c;
	border-color: #16181c;
	color: #fff;
}

@media ( max-width: 480px ) {
	.wls-mag-grid {
		grid-template-columns: repeat( 3, 1fr );
	}
}

/* ---------- Motion ---------- */

@media ( prefers-reduced-motion: no-preference ) {
	.wls-step {
		animation: wls-fade-in 0.2s ease;
	}
}

@keyframes wls-fade-in {
	from {
		opacity: 0;
		transform: translateY( 6px );
	}
	to {
		opacity: 1;
		transform: translateY( 0 );
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.wls-btn,
	.wls-option-card {
		transition: none;
	}
}

/* ---------- Dark theme: main lens selector modal only ----------
   Scoped to #wls-modal (not .wls-modal) so the separate #wls-ai-modal
   camera popup is unaffected and keeps its original light styling. */

#wls-modal .wls-modal-inner {
	background: #000;
}

#wls-modal .wls-panel-summary {
	background: #000;
}

#wls-modal .wls-panel-steps {
	background: #0d0d0d;
}

#wls-modal .wls-step-heading,
#wls-modal .wls-product-title {
	color: #ff2e9a;
}

#wls-modal .wls-step-subheading,
#wls-modal .wls-summary-row,
#wls-modal .wls-link-btn,
#wls-modal .wls-inline-link,
#wls-modal .wls-checkbox-row,
#wls-modal .wls-pd-label,
#wls-modal .wls-rx-card-title,
#wls-modal .wls-option-title,
#wls-modal .wls-suboption-title,
#wls-modal .wls-upload-dropzone p,
#wls-modal .wls-rx-table th {
	color: #fff;
}

#wls-modal .wls-modal-close,
#wls-modal .wls-back-icon-btn {
	color: #fff;
}

#wls-modal .wls-modal-close:focus-visible,
#wls-modal .wls-back-icon-btn:focus-visible,
#wls-modal .wls-btn:focus-visible,
#wls-modal .wls-option-card:focus-visible,
#wls-modal .wls-suboption-card:focus-visible {
	outline-color: #fff;
}

#wls-modal .wls-summary-divider {
	border-top-color: rgba( 255, 255, 255, 0.25 );
}

/* SVGs use stroke/fill="currentColor" -- setting color here turns them white. */
#wls-modal .wls-option-icon,
#wls-modal .wls-option-chevron,
#wls-modal .wls-suboption-icon,
#wls-modal .wls-substep-icon,
#wls-modal .wls-substep-chevron,
#wls-modal .wls-tooltip-icon,
#wls-modal .wls-upload-dropzone svg {
	color: #fff;
}

#wls-modal .wls-tooltip-icon {
	border-color: rgba( 255, 255, 255, 0.6 );
}

#wls-modal .wls-option-card {
	background: #141414;
	box-shadow: 0 1px 2px rgba( 255, 255, 255, 0.05 );
}

#wls-modal .wls-option-card:hover {
	box-shadow: 0 4px 16px rgba( 255, 255, 255, 0.12 );
}

#wls-modal .wls-option-card.is-selected {
	outline-color: #ff2e9a;
}

#wls-modal .wls-option-desc,
#wls-modal .wls-suboption-desc,
#wls-modal .wls-add-sublabel,
#wls-modal .wls-upload-filename,
#wls-modal .wls-pd-help,
#wls-modal .wls-ai-note {
	color: rgba( 255, 255, 255, 0.65 );
}

#wls-modal .wls-suboption-card {
	background: #1a1a1a;
	border-color: transparent;
}

#wls-modal .wls-suboption-card:hover {
	border-color: rgba( 255, 255, 255, 0.3 );
}

#wls-modal .wls-suboption-card.is-selected {
	border-color: #ff2e9a;
}

#wls-modal .wls-suboption-logo {
	background: rgba( 255, 255, 255, 0.12 );
	color: rgba( 255, 255, 255, 0.6 );
}

#wls-modal .wls-tint-group {
	background: #141414;
}

#wls-modal .wls-tint-group.has-selection {
	background: rgba( 255, 46, 154, 0.1 );
	border-color: #ff2e9a;
}

#wls-modal .wls-tint-group-title {
	color: #fff;
}

#wls-modal .wls-tint-group-selected {
	color: rgba( 255, 255, 255, 0.65 );
}

#wls-modal .wls-tint-swatch.is-selected {
	box-shadow: 0 0 0 2px #141414, 0 0 0 4px #ff2e9a;
}

#wls-modal .wls-substep-tab {
	background: #141414;
	color: rgba( 255, 255, 255, 0.55 );
}

#wls-modal .wls-substep-tab.is-active {
	color: #ff2e9a;
	border-color: #ff2e9a;
}

#wls-modal .wls-rx-card {
	background: #141414;
	box-shadow: 0 1px 2px rgba( 255, 255, 255, 0.05 );
}

#wls-modal .wls-rx-select,
#wls-modal .wls-rx-input {
	background: #1a1a1a;
	border-color: #333;
	color: #fff;
}

#wls-modal .wls-rx-axis:disabled {
	background: #0d0d0d;
	color: rgba( 255, 255, 255, 0.3 );
	border-color: #2a2a2a;
}

#wls-modal .wls-prism-base {
	background: #0d0d0d;
	color: rgba( 255, 255, 255, 0.3 );
}

#wls-modal .wls-add-row,
#wls-modal .wls-pd-block {
	border-color: #333;
}

#wls-modal .wls-disclaimer-note {
	background: #1a1a1a;
	color: rgba( 255, 255, 255, 0.75 );
}

#wls-modal .wls-upload-dropzone {
	border-color: rgba( 255, 255, 255, 0.3 );
}

#wls-modal .wls-upload-dropzone:hover {
	border-color: #ff2e9a;
	background: rgba( 255, 255, 255, 0.04 );
}

#wls-modal .wls-mag-option {
	background: #141414;
	border-color: #333;
	color: #fff;
}

#wls-modal .wls-mag-option:hover {
	border-color: #ff2e9a;
}

#wls-modal .wls-mag-option.is-selected {
	background: #ff2e9a;
	border-color: #ff2e9a;
	color: #000;
}

#wls-modal .wls-btn-primary {
	background: #ff2e9a;
	border-color: #ff2e9a;
	color: #000;
}

#wls-modal .wls-tier-banner {
	background: #141414;
	color: rgba( 255, 255, 255, 0.75 );
}

#wls-modal .wls-tier-card {
	background: #141414;
	box-shadow: 0 1px 2px rgba( 255, 255, 255, 0.05 );
}

#wls-modal .wls-tier-card:hover {
	box-shadow: 0 4px 16px rgba( 255, 255, 255, 0.12 );
}

#wls-modal .wls-tier-card:focus-visible {
	outline-color: #fff;
}

#wls-modal .wls-tier-card.is-selected {
	border-color: #fff;
}

#wls-modal .wls-tier-title,
#wls-modal .wls-tier-price,
#wls-modal .wls-tier-features {
	color: #fff;
}

#wls-modal .wls-tier-index em {
	color: rgba( 255, 255, 255, 0.55 );
}

/* ---------- Responsive ---------- */

@media ( max-width: 860px ) {
	.wls-modal-inner {
		grid-template-columns: 1fr;
		overflow-y: auto;
	}

	.wls-panel {
		max-height: none;
		padding: 36px 24px;
	}

	.wls-summary-divider {
		margin: 24px 0 18px;
	}

	.wls-product-image {
		max-width: 220px;
	}
}
