.ipos-theme-page {
	width: min(100%, 1280px);
	margin: 0 auto;
	color: var(--ipos-ink);
}

.ipos-theme-library__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--ipos-line);
}

.ipos-theme-library__actions [data-ipos-theme-status] {
	margin: 0;
	color: var(--ipos-muted);
	font-size: 11px;
	line-height: 1.4;
}

.ipos-theme-library__actions [data-ipos-theme-status].is-success { color: var(--ipos-success, #197a35); }
.ipos-theme-library__actions [data-ipos-theme-status].is-error { color: var(--ipos-danger, #b42318); }
.ipos-theme-library__actions [data-ipos-theme-status].is-pending { color: var(--ipos-action); }

.ipos-theme-library__actions [data-ipos-theme-save] {
	display: inline-flex;
	min-width: 128px;
	min-height: 38px;
	align-items: center;
	justify-content: center;
	padding: 0 16px;
	border: 1px solid color-mix(in srgb, var(--ipos-action) 80%, transparent);
	border-radius: 11px;
	background: var(--ipos-action);
	color: #fff;
	font-size: 11px;
	font-weight: 780;
	line-height: 1;
	text-align: center;
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 24%), 0 7px 16px color-mix(in srgb, var(--ipos-action) 20%, transparent);
	transition: background 160ms ease, box-shadow 160ms ease, opacity 160ms ease, transform 140ms ease;
}

.ipos-theme-library__actions [data-ipos-theme-save]:not(:disabled):hover {
	background: var(--ipos-action-hover);
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 24%), 0 9px 20px color-mix(in srgb, var(--ipos-action) 30%, transparent);
	transform: translateY(-1px);
}

.ipos-theme-library__actions [data-ipos-theme-save]:focus-visible,
.ipos-theme-choice > input:focus-visible + .ipos-theme-choice__card,
.ipos-theme-segment > input:focus-visible + span {
	outline: 3px solid var(--ipos-focus);
	outline-offset: 2px;
}

.ipos-theme-library__actions [data-ipos-theme-save]:disabled {
	background: color-mix(in srgb, var(--ipos-muted) 44%, var(--ipos-surface));
	border-color: var(--ipos-line);
	box-shadow: none;
	cursor: default;
	opacity: .72;
}

.ipos-theme-settings {
	display: grid;
	grid-template-columns: minmax(320px, .9fr) minmax(0, 1.45fr);
	gap: 14px;
	min-width: 0;
	margin: 0;
}

.ipos-theme-library,
.ipos-theme-preview {
	min-width: 0;
	padding: clamp(18px, 2.4vw, 26px);
	border: 1px solid var(--ipos-lg-edge, var(--ipos-line));
	border-radius: 22px;
	background: var(--ipos-lg-content, var(--ipos-surface));
	box-shadow: inset 0 1px 0 var(--ipos-lg-inner-highlight, rgb(255 255 255 / 52%)), 0 15px 34px var(--ipos-lg-shadow, rgb(30 84 57 / 14%));
	-webkit-backdrop-filter: blur(20px) saturate(1.12);
	backdrop-filter: blur(20px) saturate(1.12);
}

.ipos-theme-section-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 17px;
}

.ipos-theme-section-header h2 {
	margin: 0;
	color: var(--ipos-lg-ink, var(--ipos-ink));
	font-size: clamp(20px, 2.2vw, 27px);
	font-weight: 740;
	letter-spacing: -.045em;
	line-height: 1.05;
}

.ipos-theme-library__count,
.ipos-theme-preview__state {
	flex: 0 0 auto;
	margin-top: 2px;
	padding: 5px 8px;
	border: 1px solid var(--ipos-line);
	border-radius: 999px;
	color: var(--ipos-muted);
	font-size: 10px;
	font-weight: 740;
	line-height: 1;
	white-space: nowrap;
}

.ipos-theme-settings__form {
	display: grid;
	gap: 19px;
	min-width: 0;
}

.ipos-theme-settings fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.ipos-theme-settings legend {
	margin: 0 0 8px;
	color: var(--ipos-lg-ink, var(--ipos-ink));
	font-size: 11px;
	font-weight: 780;
	letter-spacing: .02em;
}

.ipos-theme-settings__segmented {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px;
	padding: 4px;
	border: 1px solid var(--ipos-line);
	border-radius: 12px;
	background: color-mix(in srgb, var(--ipos-surface-muted) 80%, transparent);
}

.ipos-theme-segment {
	position: relative;
	min-width: 0;
	cursor: pointer;
}

.ipos-theme-segment > input,
.ipos-theme-choice > input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.ipos-theme-segment > span {
	display: flex;
	min-height: 32px;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: 1px solid transparent;
	border-radius: 8px;
	color: var(--ipos-muted);
	font-size: 11px;
	font-weight: 700;
	transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.ipos-theme-segment > input:checked + span {
	border-color: var(--ipos-line-strong);
	background: var(--ipos-surface);
	box-shadow: 0 3px 9px var(--ipos-lg-shadow, rgb(30 84 57 / 10%));
	color: var(--ipos-action);
}

.ipos-theme-segment__icon {
	font-size: 14px;
	line-height: 1;
}

.ipos-theme-settings__choices {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.ipos-theme-choice {
	position: relative;
	display: block;
	min-width: 0;
	cursor: pointer;
}

.ipos-theme-choice__card {
	position: relative;
	display: grid;
	min-height: 94px;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: 58px auto;
	align-items: center;
	gap: 7px 6px;
	padding: 10px;
	border: 1px solid var(--ipos-line);
	border-radius: 14px;
	background: color-mix(in srgb, var(--ipos-surface) 83%, transparent);
	color: var(--ipos-lg-ink, var(--ipos-ink));
	transition: border-color 160ms ease, background 160ms ease, box-shadow 180ms ease, transform 140ms ease;
}

.ipos-theme-choice:hover .ipos-theme-choice__card {
	border-color: var(--ipos-line-strong);
	transform: translateY(-1px);
}

.ipos-theme-choice > input:checked + .ipos-theme-choice__card {
	border-color: var(--ipos-action);
	background: color-mix(in srgb, var(--ipos-action) 8%, var(--ipos-surface));
	box-shadow: inset 0 1px 0 var(--ipos-lg-inner-highlight), 0 7px 15px var(--ipos-lg-shadow, rgb(30 84 57 / 11%));
}

.ipos-theme-choice__swatch {
	display: block;
	width: 100%;
	height: 58px;
	grid-column: 1 / -1;
	border: 1px solid rgb(255 255 255 / 72%);
	border-radius: 11px;
	background-position: center;
	background-size: cover;
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 56%), 0 5px 10px rgb(17 35 26 / 12%);
}

.ipos-theme-choice__swatch--emerald { background-image: url('ipos-ambient-emerald-light-v1.webp'); }
.ipos-theme-choice__swatch--ocean { background-image: url('ipos-ambient-ocean-light-v1.webp'); }
.ipos-theme-choice__swatch--indigo { background-image: url('ipos-ambient-indigo-light-v1.webp'); }

.ipos-theme-choice__meta {
	display: block;
	grid-column: 1;
	min-width: 0;
	overflow: hidden;
}

.ipos-theme-choice__meta strong {
	display: block;
	overflow: hidden;
	font-size: 12px;
	font-weight: 780;
	letter-spacing: -.01em;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ipos-theme-choice__meta small {
	display: block;
	margin-top: 4px;
	overflow: hidden;
	color: var(--ipos-lg-ink-muted, var(--ipos-muted));
	font-size: 9px;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ipos-theme-choice__check {
	display: grid;
	width: 18px;
	height: 18px;
	grid-column: 2;
	margin-left: 0;
	place-items: center;
	border: 1px solid var(--ipos-line);
	border-radius: 50%;
	color: transparent;
	font-size: 11px;
	font-weight: 800;
}

.ipos-theme-choice > input:checked + .ipos-theme-choice__card .ipos-theme-choice__check {
	border-color: var(--ipos-action);
	background: var(--ipos-action);
	color: #fff;
}

.ipos-theme-preview__frame {
	overflow: hidden;
	border: 1px solid var(--ipos-line-strong);
	border-radius: 15px;
	background: color-mix(in srgb, var(--ipos-surface-muted) 86%, transparent);
	box-shadow: inset 0 1px 0 var(--ipos-lg-inner-highlight), 0 9px 20px var(--ipos-lg-shadow, rgb(30 84 57 / 10%));
}

.ipos-theme-preview__topbar {
	display: flex;
	min-height: 29px;
	align-items: center;
	gap: 9px;
	padding: 0 10px;
	border-bottom: 1px solid var(--ipos-line);
	background: color-mix(in srgb, var(--ipos-surface) 88%, transparent);
	color: var(--ipos-muted);
	font-size: 8px;
}

.ipos-theme-preview__topbar strong { color: var(--ipos-action); font-size: 10px; letter-spacing: -.03em; }
.ipos-theme-preview__topbar-status { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.ipos-theme-preview__topbar-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--ipos-success, var(--ipos-action)); }

.ipos-theme-preview__body {
	display: grid;
	grid-template-columns: 74px minmax(0, 1fr);
	min-height: 286px;
}

.ipos-theme-preview__nav {
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding: 10px 6px;
	border-right: 1px solid var(--ipos-line);
	background: color-mix(in srgb, var(--ipos-surface) 68%, transparent);
	color: var(--ipos-muted);
	font-size: 7px;
	line-height: 1.25;
}

.ipos-theme-preview__nav strong { margin: 0 2px 7px; color: var(--ipos-action); font-size: 10px; }
.ipos-theme-preview__nav span { padding: 5px 4px; border-radius: 6px; }
.ipos-theme-preview__nav span.is-active { background: color-mix(in srgb, var(--ipos-action) 13%, transparent); color: var(--ipos-action); font-weight: 760; }

.ipos-theme-preview__content { min-width: 0; padding: 10px; }
.ipos-theme-preview__toolbar { display: flex; align-items: center; gap: 5px; margin-bottom: 10px; color: var(--ipos-ink); font-size: 8px; font-weight: 700; }
.ipos-theme-preview__search,
.ipos-theme-preview__toolbar-filter { padding: 5px 7px; border: 1px solid var(--ipos-line); border-radius: 6px; background: var(--ipos-surface); color: var(--ipos-muted); font-size: 7px; font-weight: 500; }
.ipos-theme-preview__search { margin-left: auto; }

.ipos-theme-preview__split { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(130px, .85fr); gap: 9px; min-width: 0; }
.ipos-theme-preview__tables { min-width: 0; }
.ipos-theme-preview__tables > p { margin: 0 0 5px; color: var(--ipos-muted); font-size: 8px; font-weight: 760; }
.ipos-theme-preview__tables > p:not(:first-child) { margin-top: 10px; }
.ipos-theme-preview__table-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ipos-theme-preview__table-grid > span { display: flex; min-height: 52px; flex-direction: column; justify-content: center; gap: 2px; padding: 5px; border: 1px solid var(--ipos-line); border-radius: 8px; background: var(--ipos-surface); color: var(--ipos-ink); }
.ipos-theme-preview__table-grid b { font-size: 10px; }
.ipos-theme-preview__table-grid small { color: var(--ipos-muted); font-size: 7px; }
.ipos-theme-preview__table-grid em { color: var(--ipos-muted); font-size: 6px; font-style: normal; }
.ipos-theme-preview__table-grid > span.is-served { border-color: color-mix(in srgb, var(--ipos-success, #197a35) 38%, var(--ipos-line)); background: color-mix(in srgb, var(--ipos-success, #197a35) 10%, var(--ipos-surface)); }
.ipos-theme-preview__table-grid > span.is-working { border-color: color-mix(in srgb, var(--ipos-warning, #b87500) 38%, var(--ipos-line)); background: color-mix(in srgb, var(--ipos-warning, #b87500) 10%, var(--ipos-surface)); }
.ipos-theme-preview__table-grid > span.is-new { border-color: color-mix(in srgb, var(--ipos-info, #147ba6) 38%, var(--ipos-line)); background: color-mix(in srgb, var(--ipos-info, #147ba6) 10%, var(--ipos-surface)); }

.ipos-theme-preview__order { min-width: 0; padding: 10px; border: 1px solid var(--ipos-line); border-radius: 9px; background: var(--ipos-surface); box-shadow: 0 5px 12px var(--ipos-lg-shadow, rgb(30 84 57 / 8%)); }
.ipos-theme-preview__order header { display: flex; align-items: flex-start; justify-content: space-between; gap: 5px; }
.ipos-theme-preview__order header strong { font-size: 9px; line-height: 1.3; }
.ipos-theme-preview__order header span { padding: 3px 4px; border-radius: 4px; background: color-mix(in srgb, var(--ipos-warning, #b87500) 12%, transparent); color: var(--ipos-warning, #b87500); font-size: 6px; font-weight: 760; white-space: nowrap; }
.ipos-theme-preview__order > p { margin: 5px 0 9px; color: var(--ipos-muted); font-size: 7px; }
.ipos-theme-preview__order ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ipos-theme-preview__order li { display: flex; justify-content: space-between; gap: 4px; color: var(--ipos-muted); font-size: 7px; line-height: 1.25; }
.ipos-theme-preview__order li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ipos-theme-preview__order li b { flex: 0 0 auto; color: var(--ipos-ink); font-size: 7px; }
.ipos-theme-preview__order footer { display: flex; justify-content: space-between; gap: 5px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--ipos-line); color: var(--ipos-muted); font-size: 8px; }
.ipos-theme-preview__order footer b { color: var(--ipos-ink); font-size: 10px; }
.ipos-theme-preview__action { display: flex; min-height: 25px; align-items: center; justify-content: center; margin-top: 10px; border-radius: 6px; background: var(--ipos-action); color: #fff; font-size: 8px; font-weight: 760; }

@media (max-width: 1100px) {
	.ipos-theme-settings { grid-template-columns: 1fr; }
	.ipos-theme-library { display: grid; grid-template-columns: minmax(210px, .52fr) minmax(0, 1.2fr); gap: 22px; align-items: start; }
	.ipos-theme-library .ipos-theme-section-header { display: block; margin: 0; }
	.ipos-theme-library__count { display: inline-block; margin-top: 12px; }
}

@media (max-width: 700px) {
	.ipos-theme-library { display: block; }
	.ipos-theme-library .ipos-theme-section-header { display: flex; margin-bottom: 17px; }
	.ipos-theme-settings__choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ipos-theme-preview__body { grid-template-columns: 62px minmax(0, 1fr); }
	.ipos-theme-preview__split { grid-template-columns: 1fr; }
	.ipos-theme-preview__order { max-width: none; }
}

@media (max-width: 420px) {
	.ipos-theme-library__actions { align-items: flex-start; flex-direction: column; gap: 10px; }
	.ipos-theme-library__actions [data-ipos-theme-save] { width: 100%; }
	.ipos-theme-settings__choices { gap: 6px; }
	.ipos-theme-choice__card { min-height: 84px; padding: 8px; gap: 7px; }
	.ipos-theme-choice__swatch { height: 48px; }
	.ipos-theme-choice__meta strong { font-size: 11px; }
	.ipos-theme-choice__meta small { font-size: 8px; }
	.ipos-theme-preview__toolbar { flex-wrap: wrap; }
	.ipos-theme-preview__search { margin-left: 0; }
}

/* IPOS-371: Customer-first brand settings and dual-surface preview. */
.ipos-theme-section-header p {
	margin: 7px 0 0;
	color: var(--ipos-muted);
	font-size: 11px;
	line-height: 1.45;
}

.ipos-theme-settings__form { gap: 17px; }
.ipos-theme-choice__card { min-height: 82px; grid-template-rows: 46px auto; }
.ipos-theme-choice__swatch { height: 46px; }
.ipos-theme-choice > input:checked + .ipos-theme-choice__card .ipos-theme-choice__check,
.ipos-theme-library__actions [data-ipos-theme-save]:not(:disabled) { color: var(--ipos-button-primary-ink, #fff); }

.ipos-theme-custom-fieldset,
.ipos-theme-staff-fieldset {
	padding-top: 16px !important;
	border-top: 1px solid var(--ipos-line) !important;
}

.ipos-theme-custom {
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr) auto;
	align-items: end;
	gap: 9px;
}

.ipos-theme-custom__picker {
	position: relative;
	display: grid;
	width: 42px;
	height: 42px;
	place-items: center;
	overflow: hidden;
	border: 1px solid var(--ipos-line-strong);
	border-radius: 50%;
	background: var(--ipos-surface);
	cursor: pointer;
}

.ipos-theme-custom__picker input {
	position: absolute;
	inset: -8px;
	width: 58px;
	height: 58px;
	padding: 0;
	border: 0;
	cursor: pointer;
}

.ipos-theme-custom__hex input,
.ipos-theme-custom > button {
	width: 100%;
	min-height: 42px;
	box-sizing: border-box;
	border: 1px solid var(--ipos-line-strong);
	border-radius: 10px;
	background: var(--ipos-field-surface, var(--ipos-surface));
	color: var(--ipos-ink);
	font: inherit;
}

.ipos-theme-custom__hex input {
	padding: 0 13px;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	font-weight: 720;
	letter-spacing: .03em;
	text-transform: uppercase;
}

.ipos-theme-custom > button {
	width: auto;
	padding: 0 14px;
	color: var(--ipos-action);
	font-size: 11px;
	font-weight: 760;
	cursor: pointer;
}

.ipos-theme-custom > button:hover { border-color: var(--ipos-action); background: var(--ipos-action-soft, var(--ipos-surface-muted)); }
.ipos-theme-field-help { margin: 7px 0 0; color: var(--ipos-muted); font-size: 10px; line-height: 1.45; }
.ipos-theme-field-help.is-error { color: var(--ipos-danger); font-weight: 700; }
.has-invalid-custom-color .ipos-theme-custom__hex input { border-color: var(--ipos-danger); }

.ipos-theme-toggle {
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr);
	align-items: center;
	gap: 10px;
	cursor: pointer;
}

.ipos-theme-toggle > input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.ipos-theme-toggle__track {
	position: relative;
	display: block;
	width: 38px;
	height: 22px;
	border: 1px solid var(--ipos-line-strong);
	border-radius: 999px;
	background: var(--ipos-surface-muted);
	transition: background 160ms ease, border-color 160ms ease;
}

.ipos-theme-toggle__track i {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--ipos-surface);
	box-shadow: 0 2px 6px rgb(20 40 29 / 20%);
	transition: transform 160ms ease;
}

.ipos-theme-toggle > input:checked + .ipos-theme-toggle__track { border-color: var(--ipos-action); background: var(--ipos-action); }
.ipos-theme-toggle > input:checked + .ipos-theme-toggle__track i { transform: translateX(16px); }
.ipos-theme-toggle > input:focus-visible + .ipos-theme-toggle__track { outline: 3px solid var(--ipos-focus); outline-offset: 2px; }
.ipos-theme-toggle strong { display: block; color: var(--ipos-ink); font-size: 12px; line-height: 1.25; }
.ipos-theme-toggle small { display: block; margin-top: 3px; color: var(--ipos-muted); font-size: 9px; line-height: 1.4; }
.ipos-theme-mode-fieldset { margin-top: 14px; }
.ipos-theme-mode-label { display: block; margin: 0 0 8px; color: var(--ipos-ink); font-size: 11px; font-weight: 780; }

.ipos-theme-preview__tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: -3px 0 14px;
	padding: 3px;
	border: 1px solid var(--ipos-line);
	border-radius: 12px;
	background: color-mix(in srgb, var(--ipos-surface-muted) 82%, transparent);
}

.ipos-theme-preview__tabs button {
	min-height: 38px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	color: var(--ipos-muted);
	font: inherit;
	font-size: 11px;
	font-weight: 740;
	cursor: pointer;
}

.ipos-theme-preview__tabs button[aria-selected="true"] {
	border-color: color-mix(in srgb, var(--ipos-action) 46%, var(--ipos-line));
	background: var(--ipos-surface);
	box-shadow: 0 4px 10px var(--ipos-lg-shadow, rgb(30 84 57 / 10%));
	color: var(--ipos-action);
}

.ipos-theme-preview__tabs button:focus-visible { outline: 3px solid var(--ipos-focus); outline-offset: 2px; }
.ipos-theme-preview__panel[hidden] { display: none !important; }

.ipos-theme-customer-preview {
	--customer-preview-action: #197a35;
	--customer-preview-hover: #12652a;
	--customer-preview-soft: #e6f3e9;
	--customer-preview-on-action: #fff;
	position: relative;
	min-height: 350px;
	padding: 18px 18px 68px;
	overflow: hidden;
	border: 1px solid var(--ipos-line-strong);
	border-radius: 20px;
	background: #f7faf8;
	box-shadow: inset 0 1px 0 #fff, 0 12px 24px var(--ipos-lg-shadow, rgb(30 84 57 / 12%));
	color: #17251d;
}

.ipos-theme-customer-preview[data-ipos-palette="ocean"] { --customer-preview-action: #147ba6; --customer-preview-hover: #0d6288; --customer-preview-soft: #e3f2f8; }
.ipos-theme-customer-preview[data-ipos-palette="indigo"] { --customer-preview-action: #5f55bd; --customer-preview-hover: #4d439e; --customer-preview-soft: #eeecfa; }
.ipos-theme-customer-preview[data-ipos-palette="custom"] { --customer-preview-action: var(--ipos-action); --customer-preview-hover: var(--ipos-action-hover); --customer-preview-soft: var(--ipos-action-soft); --customer-preview-on-action: var(--ipos-on-action); }
.ipos-theme-customer-preview header { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.ipos-theme-customer-preview__logo { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--customer-preview-action); color: var(--customer-preview-on-action); font-size: 11px; font-weight: 850; }
.ipos-theme-customer-preview header > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.ipos-theme-customer-preview header strong { font-size: 12px; }
.ipos-theme-customer-preview header small { color: #66766d; font-size: 8px; }
.ipos-theme-customer-preview header > b { padding: 7px 9px; border: 1px solid color-mix(in srgb, var(--customer-preview-action) 30%, #d4e1d8); border-radius: 8px; background: var(--customer-preview-soft); color: var(--customer-preview-action); font-size: 9px; white-space: nowrap; }
.ipos-theme-customer-preview__search { margin-top: 14px; padding: 10px 12px; border: 1px solid #d4e1d8; border-radius: 9px; background: #fff; color: #6a7970; font-size: 9px; }
.ipos-theme-customer-preview nav { display: flex; gap: 6px; margin: 10px 0 12px; overflow: hidden; }
.ipos-theme-customer-preview nav span { padding: 6px 10px; border: 1px solid #d4e1d8; border-radius: 999px; background: #fff; color: #596c60; font-size: 8px; font-weight: 700; white-space: nowrap; }
.ipos-theme-customer-preview nav span.is-active { border-color: var(--customer-preview-action); background: var(--customer-preview-action); color: var(--customer-preview-on-action); }
.ipos-theme-customer-preview__products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.ipos-theme-customer-preview__products article { position: relative; display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) 25px; gap: 4px; padding: 0 8px 9px; overflow: hidden; border: 1px solid #d4e1d8; border-radius: 10px; background: #fff; }
.ipos-theme-customer-preview__products i { display: grid; height: 90px; grid-column: 1 / -1; place-items: center; margin: 0 -8px 5px; background: linear-gradient(145deg, #f1dbc2, #b97339); font-size: 38px; font-style: normal; }
.ipos-theme-customer-preview__products i.is-tea { background: linear-gradient(145deg, #f8d790, #dc862f); }
.ipos-theme-customer-preview__products i.is-bread { background: linear-gradient(145deg, #f7e3b8, #c9904e); }
.ipos-theme-customer-preview__products strong { grid-column: 1 / -1; overflow: hidden; font-size: 9px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.ipos-theme-customer-preview__products span { align-self: center; font-size: 9px; font-weight: 760; }
.ipos-theme-customer-preview__products button { display: grid; width: 25px; height: 25px; place-items: center; border: 0; border-radius: 50%; background: var(--customer-preview-action); color: var(--customer-preview-on-action); font-size: 16px; font-weight: 600; }
.ipos-theme-customer-preview footer { position: absolute; right: 18px; bottom: 14px; left: 18px; display: flex; min-height: 46px; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 7px 6px 13px; border: 1px solid #d4e1d8; border-radius: 12px; background: rgb(255 255 255 / 94%); box-shadow: 0 10px 22px rgb(20 50 33 / 14%); font-size: 10px; font-weight: 760; }
.ipos-theme-customer-preview footer b { display: flex; min-width: 100px; min-height: 34px; align-items: center; justify-content: center; border-radius: 8px; background: var(--customer-preview-action); color: var(--customer-preview-on-action); }

@media (max-width: 1100px) {
	.ipos-theme-library { display: block; }
	.ipos-theme-library .ipos-theme-section-header { display: flex; margin-bottom: 17px; }
}

@media (max-width: 700px) {
	.ipos-theme-custom { grid-template-columns: 42px minmax(0, 1fr); }
	.ipos-theme-custom > button { grid-column: 1 / -1; width: 100%; }
	.ipos-theme-customer-preview { min-height: 430px; padding-inline: 12px; }
	.ipos-theme-customer-preview__products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ipos-theme-customer-preview__products article:last-child { display: none; }
	.ipos-theme-customer-preview footer { right: 12px; left: 12px; }
}

@media (max-width: 420px) {
	.ipos-theme-settings__choices { grid-template-columns: 1fr; }
	.ipos-theme-choice__card { grid-template-columns: 74px minmax(0, 1fr) auto; grid-template-rows: auto; min-height: 66px; }
	.ipos-theme-choice__swatch { width: 74px; height: 46px; grid-column: 1; }
	.ipos-theme-choice__meta { grid-column: 2; }
	.ipos-theme-choice__check { grid-column: 3; }
	.ipos-theme-preview__tabs { grid-template-columns: 1fr 1fr; }
	.ipos-theme-customer-preview header { grid-template-columns: 32px minmax(0, 1fr); }
	.ipos-theme-customer-preview header > b { grid-column: 1 / -1; width: max-content; }
}

@media (prefers-reduced-motion: reduce) {
	.ipos-theme-toggle__track,
	.ipos-theme-toggle__track i { transition: none; }
}

/* IPOS-435: one focus border, with an opaque notch protecting the label. */
body.ipos-app-shell .ipos-theme-page .ipos-theme-custom__hex.ipos-field--floating > span:first-child {
	background: var(--ipos-selection-surface-solid);
	border-radius: 4px;
}
body.ipos-app-shell .ipos-theme-page .ipos-theme-custom__hex.ipos-field--floating input:focus {
	border-color: var(--ipos-field-line-focus) !important;
	outline: none !important;
	box-shadow: none !important;
}
body.ipos-app-shell .ipos-theme-page .has-invalid-custom-color .ipos-theme-custom__hex.ipos-field--floating input {
	border-color: var(--ipos-danger) !important;
}
.ipos-theme-field-help:empty { display: none; }

/* IPOS-441: WordPress can replace the gear glyph with an emoji image. */
.ipos-theme-preview__nav img.emoji {
 display: inline-block;
 width: 1em;
 height: 1em;
 margin: 0;
 vertical-align: -.1em;
}
