/*
 * MigrateX admin styles.
 *
 * Self-contained: no icon fonts, no external files. Every icon is inline SVG that takes the
 * colour of its text (see src/Admin/Icons.php). Everything is scoped under .om-app (screens)
 * or .om-modal-backdrop (dialogs, which live on <body>), so nothing leaks into wp-admin.
 *
 * Palette: WordPress's neutral admin grays with the brand Royal Blue (#2563eb) for primary
 * actions: buttons, links, focus rings, progress, active tabs. Hover is #1d4ed8, the subtle tint
 * #eff6ff, its border #bfdbfe. Blue on white is 5.2:1, and so is white on blue. Green is kept for success only (completed steps, success
 * messages and toasts), red and amber for destructive actions and warnings.
 */

.om-app,
.om-modal-backdrop {
	--om-blue: #2563eb;
	--om-blue-rgb: 37, 99, 235;
	--om-blue-hover: #1d4ed8;
	--om-blue-tint: #eff6ff;
	--om-blue-border: #bfdbfe;
	--om-accent: var(--om-blue);
	--om-accent-rgb: var(--om-blue-rgb);
	--om-text: #1d2327;
	--om-muted: #646970;
	--om-border: #e2e8f0;
	--om-dashed: #cbd5e1;
	--om-field: #cbd5e1;
	--om-surface: #fff;
	--om-subtle: #f8fafc;
	--om-error: #d63638;
	--om-warn: #dba617;
	--om-ok: #16a34a;     /* success: completed steps, success badges */
	--om-ok-ink: #047857; /* success used as text */
	--om-radius: 8px;
	--om-ease: cubic-bezier(.2, .7, .2, 1);
}

.om-app {
	max-width: none;
	margin-inline-end: 20px;
	color: var(--om-text);
}

/* Core sets display on some elements, which would otherwise beat the hidden attribute. */
.om-app [hidden],
.om-modal-backdrop [hidden] {
	display: none !important;
}

.om-icon {
	flex: none;
	width: 20px;
	height: 20px;
}

.om-icon--small {
	width: 14px;
	height: 14px;
}

.om-icon--brand {
	width: 18px;
	height: 18px;
}

/* ---------- page header ---------- */

.om-header {
	margin: 0 0 20px;
	border-bottom: 1px solid #dcdcde;
}

.om-app .om-header__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 22px 0 14px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--om-text);
}

.om-header__icon {
	width: 26px;
	height: 26px;
	color: var(--om-blue);
}

.om-notice {
	margin: 0 0 16px;
}

/* ---------- two-column dashboard ---------- */

.om-layout {
	display: grid;
	grid-template-columns: minmax(0, 77fr) minmax(210px, 23fr);
	gap: 20px;
	align-items: start;
}

.om-layout__main {
	min-width: 0;
}

@media (max-width: 960px) {
	.om-layout {
		grid-template-columns: minmax(0, 1fr);
	}
}

.om-card {
	background: var(--om-surface);
	border: 1px solid var(--om-border);
	border-radius: var(--om-radius);
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.om-hint {
	margin: 12px 0 0;
	color: var(--om-muted);
}

.om-hint--tight {
	margin: 0 0 14px;
}

.om-hint--inline {
	margin: 0;
}

/* ---------- buttons ---------- */

.om-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	min-height: 44px;
	padding: 0 20px;
	border: 2px solid transparent;
	border-radius: 6px;
	background: none;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .06em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}

.om-btn:focus-visible {
	outline: 2px solid var(--om-blue);
	outline-offset: 2px;
}

.om-btn:disabled {
	opacity: .5;
	cursor: not-allowed;
}

/* the signature button: green outline, green text */
.om-btn--outline {
	border-color: var(--om-blue);
	background: var(--om-surface);
	color: var(--om-blue);
}

.om-btn--outline:hover:not(:disabled),
.om-btn--outline[aria-expanded="true"] {
	border-color: var(--om-blue);
	background: var(--om-blue-tint);
	color: var(--om-blue);
}

.om-btn--solid {
	border-color: var(--om-blue);
	background: var(--om-blue);
	color: #fff;
}

.om-btn--solid:hover:not(:disabled) {
	border-color: var(--om-blue-hover);
	background: var(--om-blue-hover);
	color: #fff;
}

.om-btn--quiet {
	min-height: 36px;
	padding: 0 12px;
	color: var(--om-muted);
}

.om-btn--quiet:hover {
	color: var(--om-text);
}

/* "+ ADD": an outline pill */
.om-btn--add {
	min-height: 36px;
	padding: 0 18px;
	gap: 6px;
	border: 1.5px solid var(--om-blue);
	border-radius: 999px;
	background: transparent;
	color: var(--om-blue);
}

.om-btn--add svg {
	width: 14px;
	height: 14px;
}

.om-btn--add:hover:not(:disabled) {
	background: var(--om-blue-tint);
	color: var(--om-blue-hover);
}

.om-btn--add:focus-visible {
	outline: 2px solid var(--om-blue);
	outline-offset: 2px;
}

.om-btn--add:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.om-btn--small {
	min-height: 34px;
	padding: 0 8px;
	gap: 6px;
	border: 1px solid var(--om-field);
	background: var(--om-surface);
	color: #334155;
	font-size: 12px;
}

.om-btn--small .om-icon {
	width: 16px;
	height: 16px;
}

.om-btn--small:hover:not(:disabled) {
	border-color: var(--om-blue);
	color: var(--om-blue);
}

.om-btn--danger:hover:not(:disabled) {
	border-color: var(--om-error);
	background: #fcf0f1;
	color: #a01d1f;
}

.om-caret {
	margin-inline-start: 2px;
	transition: transform .2s var(--om-ease);
}

.om-btn[aria-expanded="true"] .om-caret {
	transform: rotate(180deg);
}

/* ---------- dropdown ---------- */

.om-dropdown {
	position: relative;
	display: inline-block;
}

.om-menu {
	position: absolute;
	inset-inline-start: 0;
	top: calc(100% + 6px);
	z-index: 20;
	min-width: 260px;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: var(--om-surface);
	border: 1px solid var(--om-border);
	border-radius: var(--om-radius);
	box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
	text-align: start;
	animation: om-pop .16s var(--om-ease);
}

.om-menu[hidden] {
	display: none;
}

.om-menu li {
	margin: 0;
}

.om-menu__item {
	display: flex;
	align-items: center;
	gap: 12px;
	box-sizing: border-box;
	width: 100%;
	padding: 11px 12px;
	border: 0;
	border-radius: 6px;
	background: none;
	color: #334155;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .05em;
	text-align: start;
	cursor: pointer;
}

.om-menu__label {
	flex: 1;
}

/* the destination that works is highlighted */
button.om-menu__item {
	background: var(--om-blue-tint);
	color: var(--om-blue);
}

button.om-menu__item:hover,
button.om-menu__item:focus-visible {
	background: #dbeafe;
	outline: 0;
}

button.om-menu__item:focus-visible {
	box-shadow: inset 0 0 0 2px var(--om-blue);
}

.om-menu__item.is-disabled {
	opacity: .6;
	cursor: not-allowed;
}

.om-badge {
	padding: 2px 8px;
	border-radius: 999px;
	background: #f1f5f9;
	color: var(--om-muted);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}

/* ---------- accordions (Find / Replace, Advanced options) ---------- */

.om-accordion {
	border-bottom: 1px solid var(--om-border);
}

.om-accordion > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	list-style: none;
	cursor: pointer;
	user-select: none;
}

.om-accordion > summary::-webkit-details-marker {
	display: none;
}

.om-accordion > summary::marker {
	content: "";
}

.om-accordion > summary:focus-visible {
	outline: 2px solid var(--om-blue);
	outline-offset: -2px;
	border-radius: var(--om-radius);
}

.om-accordion__title {
	font-size: 14px;
	font-weight: 600;
	color: var(--om-text);
}

.om-accordion__chevron {
	color: var(--om-muted);
	transition: transform .2s var(--om-ease);
}

.om-accordion[open] > summary .om-accordion__chevron {
	transform: rotate(180deg);
}

/* the "Advanced options" toggle leads with its arrow and turns it down when open */
.om-accordion--advanced > summary {
	justify-content: flex-start;
}

.om-accordion--advanced > summary .om-accordion__title {
	font-weight: 500;
	color: var(--om-muted);
}

.om-accordion--advanced[open] > summary .om-accordion__chevron {
	transform: rotate(90deg);
}

.om-accordion__body {
	padding: 4px 20px 20px;
}

.om-ph {
	display: inline-block;
	margin: 0 2px;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--om-blue-tint);
	color: var(--om-blue);
	box-shadow: inset 0 0 0 1px var(--om-blue-border);
	font-size: 13px;
	font-weight: 600;
}

/* ---------- find / replace: one collapsible card per rule, then "+ ADD" ---------- */

/* what the user typed in the header chip: long values are cut short rather than breaking the layout */
.om-find__title .om-ph {
	max-width: 14em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: bottom;
}

.om-find__title .om-ph.is-typed {
	background: var(--om-blue);
	color: #fff;
}

.om-find {
	padding: 16px 20px 20px;
	border-bottom: 1px solid var(--om-border);
}

.om-find__rows {
	display: grid;
	gap: 12px;
	margin-bottom: 14px;
}

.om-find__row {
	border: 1px solid var(--om-border);
	border-radius: var(--om-radius);
	background: var(--om-surface);
}

.om-find__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-radius: var(--om-radius);
	list-style: none;
	cursor: pointer;
	user-select: none;
	font-size: 14px;
	font-weight: 600;
	color: var(--om-text);
}

.om-find__head::-webkit-details-marker {
	display: none;
}

.om-find__head::marker {
	content: "";
}

.om-find__head:hover {
	background: var(--om-subtle);
}

.om-find__head:focus-visible {
	outline: 2px solid var(--om-blue);
	outline-offset: -2px;
}

.om-find__title {
	min-width: 0;
	line-height: 1.7;
}

/* ">" while collapsed, "v" while open */
.om-find__chevron {
	flex: none;
	color: var(--om-muted);
	transition: transform .2s var(--om-ease);
}

[dir="rtl"] .om-find__chevron {
	transform: scaleX(-1);
}

.om-find__row[open] > .om-find__head .om-find__chevron {
	transform: rotate(90deg);
}

.om-find__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
	align-items: start;
	padding: 2px 16px 16px;
}

.om-find__fields {
	display: grid;
	gap: 10px;
}

.om-find__fields label {
	display: block;
}

.om-find__fields input[type="text"] {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	min-height: 42px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--om-field);
	border-radius: 6px;
	background: var(--om-surface);
	box-shadow: none;
	font-size: 14px;
}

.om-find__fields input[type="text"]:focus {
	border-color: var(--om-blue);
	outline: 0;
	box-shadow: 0 0 0 3px rgba(var(--om-blue-rgb), .25);
}

/* the trash can sits at the top right of the open card, quiet until hovered */
.om-find__remove {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--om-muted);
	cursor: pointer;
}

.om-find__remove svg {
	width: 16px;
	height: 16px;
}

.om-find__remove:hover {
	background: #fcf0f1;
	color: var(--om-error);
}

.om-find__remove:focus-visible {
	outline: 2px solid var(--om-blue);
}

.om-find__remove[hidden] {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.om-find__chevron {
		transition: none;
	}
}

.om-advanced__body {
	display: grid;
	gap: 12px;
	padding-top: 0;
}

.om-app input[type="radio"],
.om-switch input[type="checkbox"] {
	accent-color: var(--om-blue);
}

.om-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	padding: 20px;
}

/* ---------- import drop zone ---------- */

.om-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 20px;
	padding: 52px 24px 48px;
	border: 2px dashed var(--om-dashed);
	border-radius: var(--om-radius);
	background: var(--om-subtle);
	text-align: center;
	cursor: pointer;
	transition: border-color .2s var(--om-ease), background-color .2s var(--om-ease), transform .2s var(--om-ease), box-shadow .2s var(--om-ease);
}

.om-drop:hover,
.om-drop:focus-visible,
.om-drop.is-over {
	border-color: var(--om-blue);
	background: var(--om-blue-tint);
	outline: 0;
}

.om-drop:focus-visible {
	box-shadow: 0 0 0 3px rgba(var(--om-blue-rgb), .3);
}

.om-drop.is-over {
	transform: scale(1.01);
	border-style: solid;
	box-shadow: 0 10px 30px rgba(var(--om-blue-rgb), .18);
}

.om-drop.is-disabled {
	opacity: .55;
	cursor: not-allowed;
}

.om-drop__icon {
	width: 72px;
	height: 72px;
	color: var(--om-blue);
	stroke-width: 1.5;
}

.om-drop:hover .om-drop__icon,
.om-drop.is-over .om-drop__icon {
	animation: om-bob 1.1s ease-in-out infinite;
}

.om-drop__title {
	margin: 14px 0 22px;
	font-size: 18px;
	font-weight: 600;
	color: #334155;
}

.om-drop__rule {
	margin: 16px 0 0;
	color: var(--om-error);
	font-weight: 600;
}

.om-note {
	display: flex;
	gap: 12px;
	margin: 0 20px 20px;
	padding: 14px 16px;
	border: 1px solid var(--om-border);
	border-inline-start: 4px solid var(--om-blue);
	border-radius: 6px;
	background: var(--om-surface);
	color: #3c434a;
	font-size: 13px;
}

.om-note p {
	margin: 0 0 6px;
}

.om-note p:last-child {
	margin-bottom: 0;
}

.om-note__icon {
	margin-top: 1px;
	color: var(--om-blue);
}

.om-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
	padding: 12px 18px;
	border: 1px solid #f0d58a;
	border-radius: var(--om-radius);
	background: #fcf9e8;
}

.om-banner p {
	margin: 0;
}

.om-banner__actions {
	display: flex;
	gap: 10px;
	flex: none;
}

/* ---------- sidebar ---------- */

.om-side__card {
	padding: 20px;
}

.om-side__title {
	margin: 0 0 12px;
	padding: 0;
	color: #334155;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

/* support channels */
.om-contact {
	display: grid;
	gap: 10px;
	margin: 0 0 22px;
	padding: 0 0 22px;
	border-bottom: 1px solid var(--om-border);
	list-style: none;
}

.om-contact li {
	margin: 0;
}

.om-contact__item {
	position: relative;
}

/* room on the right for the copy button */
.om-contact__item.has-copy .om-contact__link {
	padding-inline-end: 52px;
}

.om-contact__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid var(--om-border);
	border-radius: 6px;
	color: var(--om-text);
	text-decoration: none;
	transition: border-color .15s, background-color .15s;
}

.om-contact__link:hover,
.om-contact__link:focus-visible {
	border-color: var(--om-blue);
	background: var(--om-blue-tint);
	color: var(--om-text);
	outline: 0;
}

.om-contact__link:focus-visible {
	box-shadow: 0 0 0 3px rgba(var(--om-blue-rgb), .3);
}

.om-contact__icon {
	width: 24px;
	height: 24px;
	color: var(--om-blue);
}

.om-contact__text {
	min-width: 0;
}

.om-contact__text strong,
.om-contact__text small {
	display: block;
	/* break only at the <wbr> after the @, and mid-word only if something is longer than the card */
	overflow-wrap: break-word;
}

.om-contact__text strong {
	font-size: 13px;
	font-weight: 600;
}

.om-contact__text small {
	margin-top: 1px;
	color: var(--om-muted);
	font-size: 12px;
}

/* "Copy email" button beside the email row */
.om-copy {
	position: absolute;
	inset-block: 0;
	inset-inline-end: 10px;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	margin: auto 0;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--om-muted);
	cursor: pointer;
}

.om-copy:hover {
	background: var(--om-blue-tint);
	color: var(--om-blue);
}

.om-copy:focus-visible {
	outline: 2px solid var(--om-blue);
	outline-offset: 1px;
	color: var(--om-blue);
}

.om-copy .om-icon {
	width: 18px;
	height: 18px;
}

.om-copy__done {
	display: none;
}

.om-copy.is-copied {
	color: var(--om-ok-ink);
}

.om-copy.is-copied .om-copy__icon {
	display: none;
}

.om-copy.is-copied .om-copy__done {
	display: block;
}

.om-copy.is-failed {
	color: #a01d1f;
}

.om-copy__tip {
	position: absolute;
	inset-block-end: calc(100% + 4px);
	inset-inline-end: 0;
	padding: 3px 8px;
	border-radius: 4px;
	background: #1d2327;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity .15s;
}

.om-copy.is-copied .om-copy__tip,
.om-copy.is-failed .om-copy__tip {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.om-copy__tip {
		transition: none;
	}
}

/* feedback form */
.om-feedback {
	margin: 0;
}

.om-field {
	margin-bottom: 12px;
}

.om-field label {
	display: block;
	margin-bottom: 4px;
	color: #3c434a;
	font-size: 12px;
	font-weight: 600;
}

.om-field input[type="email"],
.om-field select,
.om-field textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid var(--om-field);
	border-radius: 6px;
	background: var(--om-surface);
	box-shadow: none;
	font-size: 13px;
	line-height: 1.4;
}

.om-field input[type="email"],
.om-field select {
	min-height: 38px;
}

.om-field textarea {
	min-height: 92px;
	resize: vertical;
}

.om-field input:focus,
.om-field select:focus,
.om-field textarea:focus {
	border-color: var(--om-blue);
	outline: 0;
	box-shadow: 0 0 0 3px rgba(var(--om-blue-rgb), .25);
}

.om-field [aria-invalid="true"] {
	border-color: var(--om-error);
}

.om-field [aria-invalid="true"]:focus {
	box-shadow: 0 0 0 3px rgba(214, 54, 56, .2);
}

.om-feedback__send {
	width: 100%;
}

/* the button shows a plane at rest and a spinning ring while sending */
.om-feedback__spinner {
	display: none;
}

.om-feedback__send.is-busy .om-feedback__spinner {
	display: block;
	animation: om-spin .8s linear infinite;
}

.om-feedback__send.is-busy .om-feedback__plane {
	display: none;
}

.om-feedback__send.is-busy {
	cursor: progress;
}

.om-feedback__status {
	margin: 12px 0 0;
	padding: 9px 12px;
	border-inline-start: 4px solid var(--om-border);
	border-radius: 4px;
	background: var(--om-subtle);
	font-size: 13px;
	line-height: 1.45;
}

.om-feedback__fallback {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin-top: 4px;
}

.om-feedback__fallback a {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
}

.om-feedback__status.is-success {
	border-color: var(--om-ok);
	background: #f0fdf4;
	color: #14532d;
}

.om-feedback__status.is-error {
	border-color: var(--om-error);
	background: #fcf0f1;
	color: #8a2424;
}

.om-feedback__privacy {
	margin: 10px 0 0;
	color: var(--om-muted);
	font-size: 11.5px;
	line-height: 1.45;
}

/* ---------- site-to-site ---------- */

.om-remote {
	padding: 22px 24px;
	margin-bottom: 20px;
}

.om-remote__title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 600;
	color: #334155;
}

.om-remote__help {
	margin: 0 0 16px;
	color: #475569;
	font-size: 13.5px;
	line-height: 1.5;
}

.om-remote__key {
	margin-top: 18px;
}

.om-remote .om-field textarea {
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
	word-break: break-all;
}

.om-remote__status,
.om-remote__countdown {
	margin: 8px 0;
	color: #475569;
	font-size: 13px;
}

.om-remote__countdown strong {
	font-variant-numeric: tabular-nums;
	color: var(--om-blue);
}

.om-remote__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 10px;
}

/* ---------- backups ---------- */

/* The empty Backups area looks and reacts like the Import drop zone: same dashed frame, and the
   same green tint on hover, keyboard focus inside it, and (is-over) a file held over it. */
.om-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 20px;
	padding: 52px 24px 48px;
	border: 2px dashed var(--om-dashed);
	border-radius: var(--om-radius);
	background: var(--om-subtle);
	text-align: center;
	transition: border-color .2s var(--om-ease), background-color .2s var(--om-ease), transform .2s var(--om-ease), box-shadow .2s var(--om-ease);
}

.om-empty:hover,
.om-empty:focus-within,
.om-empty.is-over {
	border-color: var(--om-blue);
	background: var(--om-blue-tint);
}

.om-empty:focus-within {
	box-shadow: 0 0 0 3px rgba(var(--om-blue-rgb), .3);
}

.om-empty.is-over {
	transform: scale(1.01);
	border-style: solid;
	box-shadow: 0 10px 30px rgba(var(--om-blue-rgb), .18);
}

.om-empty__icon {
	width: 56px;
	height: 56px;
	color: var(--om-dashed);
	stroke-width: 1.5;
	transition: color .2s var(--om-ease);
}

.om-empty:hover .om-empty__icon,
.om-empty:focus-within .om-empty__icon,
.om-empty.is-over .om-empty__icon {
	color: var(--om-blue);
	animation: om-bob 1.1s ease-in-out infinite;
}

.om-empty__text {
	margin: 14px 0 22px;
	color: #475569;
	font-size: 16px;
}

.om-table-wrap {
	/* The visually hidden button labels below are absolutely positioned. Without a positioned
	   ancestor here they escape this scroll area, land beyond the right edge and make the whole
	   page wider than a phone (the phone then zooms the page out to fit). */
	position: relative;
	overflow-x: auto;
	/* lets the table react to the width of its card rather than the window */
	container-type: inline-size;
}

.om-table th:first-child,
.om-table td:first-child {
	padding-inline-start: 20px;
}

.om-table th:last-child,
.om-table td:last-child {
	padding-inline-end: 20px;
}

.om-table {
	width: 100%;
	border-collapse: collapse;
}

.om-table th {
	padding: 14px 12px;
	border-bottom: 1px solid var(--om-border);
	color: var(--om-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-align: start;
	text-transform: uppercase;
}

.om-table td {
	padding: 14px 12px;
	border-bottom: 1px solid var(--om-border);
	vertical-align: middle;
}

.om-table tbody tr:last-child td {
	border-bottom: 0;
}

.om-table tbody tr:hover {
	background: var(--om-subtle);
}

.om-table__name {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: Consolas, Monaco, monospace;
	font-size: 13px;
	/* Break at the hyphens first. (break-word, not anywhere: "anywhere" lets the column shrink to one
	   character, so the table would starve this column first.) */
	overflow-wrap: break-word;
	min-width: 140px;
}

/* The file name gets the largest share but is the column that gives way when space is short:
   date, size and the three actions each stay on one line. */
.om-table th:first-child,
.om-table td:first-child {
	width: 42%;
}

.om-table td:nth-child(2),
.om-table td:nth-child(3) {
	white-space: nowrap;
}

.om-table__icon {
	color: var(--om-blue);
}

/* The actions keep one line; the file name is the column that gives way. */
.om-table__actions {
	text-align: end;
	white-space: nowrap;
}

.om-table__actions .om-btn {
	margin: 2px 0 2px 6px;
}

/* In a narrow card the three actions drop their words and keep their icons. The text stays in the
   page, visually hidden, so each button still has an accessible name. */
@container (max-width: 780px) {
	.om-table__actions .om-btn > span {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.om-table__actions .om-btn {
		position: relative;
		width: 34px;
		padding: 0;
	}
}

[dir="rtl"] .om-table__actions .om-btn {
	margin: 2px 6px 2px 0;
}

.om-table[hidden],
.om-empty[hidden] {
	display: none;
}

/* ---------- progress, steps (used inside the dialogs) ---------- */

.om-run__top {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 14px;
}

.om-run__text {
	flex: 1;
	min-width: 0;
}

.om-run__label {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
}

.om-run__detail {
	margin: 2px 0 0;
	color: var(--om-muted);
	font-variant-numeric: tabular-nums;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.om-run__pct {
	font-size: 20px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--om-blue);
}

.om-run__error {
	margin: 14px 0 0;
	padding: 10px 14px;
	border-inline-start: 4px solid var(--om-error);
	border-radius: 4px;
	background: #fcf0f1;
	color: #8a2424;
}

.om-spinner {
	flex: none;
	width: 26px;
	height: 26px;
	border: 3px solid rgba(var(--om-blue-rgb), .2);
	border-top-color: var(--om-blue);
	border-radius: 50%;
	animation: om-spin .8s linear infinite;
}

.om-progress {
	height: 10px;
	overflow: hidden;
	border-radius: 999px;
	background: #e9eaec;
}

.om-progress__bar {
	height: 100%;
	width: 100%;
	transform: scaleX(0);
	transform-origin: left center;
	border-radius: inherit;
	background-color: var(--om-blue);
	background-image: linear-gradient(135deg, rgba(255, 255, 255, .28) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .28) 50%, rgba(255, 255, 255, .28) 75%, transparent 75%);
	background-size: 20px 20px;
	transition: transform .45s var(--om-ease);
	animation: om-stripes 1s linear infinite;
}

[dir="rtl"] .om-progress__bar {
	transform-origin: right center;
}

.om-steps-list {
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
	text-align: start;
}

.om-steps-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 5px 0;
	color: var(--om-muted);
	transition: color .2s;
}

.om-steps-list li.is-active {
	color: var(--om-text);
	font-weight: 600;
}

.om-steps-list li.is-done {
	color: #3c434a;
}

.om-steps-list__dot {
	position: relative;
	flex: none;
	width: 18px;
	height: 18px;
	border: 2px solid #c3c4c7;
	border-radius: 50%;
	box-sizing: border-box;
}

.is-active > .om-steps-list__dot {
	border-color: rgba(var(--om-blue-rgb), .25);
	border-top-color: var(--om-blue);
	animation: om-spin .8s linear infinite;
}

.is-done > .om-steps-list__dot {
	border-color: var(--om-ok);
	background: var(--om-ok);
}

.is-done > .om-steps-list__dot::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 1px;
	width: 4px;
	height: 8px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.om-perma {
	margin: 0 0 4px;
	padding-inline-start: 20px;
	text-align: start;
}

.om-perma li {
	margin-bottom: 6px;
}

/* ---------- dialogs ---------- */

.om-modal-open {
	overflow: hidden;
}

.om-modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: grid;
	place-items: center;
	padding: 20px;
	background: rgba(16, 20, 24, .58);
	backdrop-filter: blur(2px);
	animation: om-fade .18s ease-out;
}

.om-modal {
	box-sizing: border-box;
	width: min(520px, 100%);
	max-height: 100%;
	overflow: auto;
	padding: 30px 30px 24px;
	border-radius: 12px;
	background: var(--om-surface);
	color: var(--om-text);
	box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
	text-align: center;
	animation: om-pop .22s var(--om-ease);
}

.om-modal--wide {
	width: min(560px, 100%);
}

.om-modal:focus {
	outline: 0;
}

.om-modal__icon {
	display: flex;
	justify-content: center;
	margin-bottom: 8px;
	color: var(--om-blue);
}

.om-modal__icon.is-success { color: var(--om-ok); }
.om-modal__icon.is-error { color: var(--om-error); }
.om-modal__icon.is-warn { color: var(--om-warn); }

.om-modal__title {
	margin: 0 0 10px;
	font-size: 21px;
	line-height: 1.3;
}

.om-modal__body {
	color: #3c434a;
	line-height: 1.55;
	text-align: start;
}

.om-modal__body p {
	margin: 0 0 12px;
}

.om-modal__body > p:first-child:last-child,
.om-modal--export-done .om-modal__body p {
	text-align: center;
}

.om-file {
	padding: 8px 12px;
	border-radius: 6px;
	background: var(--om-subtle);
	font-family: Consolas, Monaco, monospace;
	font-size: 13px;
	word-break: break-all;
	text-align: center;
}

.om-run--modal {
	margin: 14px 0;
	text-align: start;
}

.om-modal .om-hint {
	margin: 4px 0 0;
	text-align: center;
}

.om-modal__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 18px;
}

.om-modal__actions:empty {
	display: none;
}

/* The dialog buttons are built by ui.js with WordPress's .button classes; restyle them to match. */
.om-modal__actions .button {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: 0 18px;
	border: 2px solid var(--om-field);
	border-radius: 6px;
	background: var(--om-surface);
	color: #334155;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .05em;
	line-height: 40px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	box-shadow: none;
}

.om-modal__actions .button:hover,
.om-modal__actions .button:focus {
	border-color: var(--om-blue);
	background: var(--om-blue-tint);
	color: var(--om-blue);
}

.om-modal__actions .button:focus-visible {
	outline: 2px solid var(--om-blue);
	outline-offset: 2px;
}

.om-modal__actions .button-primary {
	border-color: var(--om-blue);
	background: var(--om-blue);
	color: #fff;
}

.om-modal__actions .button-primary:hover,
.om-modal__actions .button-primary:focus {
	border-color: var(--om-blue-hover);
	background: var(--om-blue-hover);
	color: #fff;
}

.om-modal__actions .button.om-primary,
.om-modal__actions .button.om-primary:visited {
	min-height: 48px;
	overflow: hidden;
	border-color: var(--om-blue);
	background: var(--om-blue);
	color: #fff;
	font-size: 14px;
	line-height: 44px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.om-modal__actions .button.om-primary:hover,
.om-modal__actions .button.om-primary:focus {
	border-color: var(--om-blue-hover);
	background: var(--om-blue-hover);
	color: #fff;
}

/* the pulsing call to action */
.om-pulse {
	animation: om-pulse 1.8s ease-out infinite;
}

.om-pulse:hover,
.om-pulse:focus {
	animation-play-state: paused;
}

.om-primary.om-pulse {
	animation-name: om-pulse-accent;
}

/* ---------- motion ---------- */

@keyframes om-spin { to { transform: rotate(360deg); } }
@keyframes om-stripes { to { background-position: 20px 0; } }
@keyframes om-fade { from { opacity: 0; } }
@keyframes om-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes om-bob { 50% { transform: translateY(-6px); } }
@keyframes om-pulse {
	0% { box-shadow: 0 0 0 0 rgba(var(--om-blue-rgb), .55); transform: scale(1); }
	60% { box-shadow: 0 0 0 16px rgba(var(--om-blue-rgb), 0); transform: scale(1.02); }
	100% { box-shadow: 0 0 0 0 rgba(var(--om-blue-rgb), 0); transform: scale(1); }
}
@keyframes om-pulse-accent {
	0% { box-shadow: 0 0 0 0 rgba(21, 128, 61, .55); transform: scale(1); }
	60% { box-shadow: 0 0 0 16px rgba(21, 128, 61, 0); transform: scale(1.02); }
	100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); transform: scale(1); }
}

/* ---------- Reset Hub ---------- */

.om-btn--dark {
	border-color: #1d2327;
	background: #1d2327;
	color: #fff;
}

.om-btn--dark:hover:not(:disabled) {
	border-color: #000;
	background: #000;
	color: #fff;
}

.om-tools {
	overflow: hidden;
}

.om-tools__intro {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	padding: 16px 20px;
	border-bottom: 1px solid var(--om-border);
	background: var(--om-subtle);
	color: var(--om-muted);
}

.om-tools__intro p {
	margin: 0;
}

.om-tools__intro-icon {
	flex: none;
	margin-top: 1px;
	color: var(--om-warn);
}

.om-tool {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	align-items: center;
	gap: 8px 16px;
	padding: 20px;
	border-bottom: 1px solid var(--om-border);
}

.om-tool:last-child {
	border-bottom: 0;
}

.om-tool__icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--om-blue-tint);
	color: var(--om-blue);
	box-shadow: inset 0 0 0 1px var(--om-blue-border);
}

.om-tool__title {
	margin: 0 0 4px;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
}

.om-tool__desc {
	margin: 0;
	color: var(--om-muted);
	font-size: 13px;
	line-height: 1.55;
}

.om-tool__actions .om-btn {
	justify-content: center;
	min-width: 156px;
}

.om-tool__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

/* In a narrow card the buttons drop under the text instead of squeezing it. */
@container (max-width: 680px) {
	.om-tool {
		grid-template-columns: 40px minmax(0, 1fr);
	}

	.om-tool__actions {
		grid-column: 1 / -1;
		justify-content: flex-start;
	}

	.om-tool__actions .om-btn {
		flex: 1 1 150px;
	}
}

.om-tools {
	container-type: inline-size;
}

/* the typed confirmation */
.om-confirm p {
	margin: 0 0 10px;
}

.om-confirm__warn {
	color: #a01d1f;
	font-weight: 600;
}

.om-confirm__label {
	display: block;
	margin: 14px 0 6px;
	font-weight: 600;
}

.om-confirm__input {
	width: 100%;
	max-width: none;
	min-height: 40px;
	border: 1px solid var(--om-field);
	border-radius: 6px;
	font-family: Consolas, Monaco, monospace;
	font-size: 15px;
	letter-spacing: .08em;
}

.om-confirm__input:focus {
	border-color: var(--om-error);
	outline: 2px solid var(--om-error);
	outline-offset: 0;
	box-shadow: none;
}

.om-modal .button.om-danger {
	border-color: #b32d2e;
	background: #b32d2e;
	color: #fff;
}

.om-modal .button.om-danger:hover:not(:disabled) {
	border-color: #8a2424;
	background: #8a2424;
}

/* ---------- form controls: selects and checkboxes ----------
   One look for every screen. The values that make up the look are tokens, so changing the palette
   (for example a darker border for stricter contrast) is a one-line edit here.

   Neither control uses a background image. A select is a wrapper holding the real <select> and an
   inline SVG chevron; a checkbox is a wrapper holding the real <input> and an inline SVG tick. The
   native elements stay in the page, so keyboard, screen readers, form posts and labels all work. */

.om-app,
.om-modal-backdrop {
	--om-control-bg: #fff;
	--om-control-border: #d1d5db;
	--om-control-text: #1f2937;
	--om-control-radius: 6px;
	--om-control-height: 40px;
	--om-control-accent: #2563eb;
	--om-control-ring: rgba(37, 99, 235, .15);
}

/* ----- select ----- */

.om-select-wrap {
	position: relative;
	display: inline-block;
	max-width: 100%;
	vertical-align: middle;
}

.om-select-wrap--block {
	display: block;
}

/* The real <select> stays in the page for its value, events and width (the widest option), but is
   invisible: select.js draws the button and the list in its place. */
.om-app .om-select-wrap .om-select {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-width: 140px;
	max-width: 100%;
	height: var(--om-control-height);
	min-height: var(--om-control-height);
	margin: 0;
	padding: 8px 36px 8px 12px;
	border: 1px solid var(--om-control-border);
	border-radius: var(--om-control-radius);
	background-color: var(--om-control-bg);
	background-image: none;
	box-shadow: none;
	color: var(--om-control-text);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	text-overflow: ellipsis;
	cursor: pointer;
}

[dir="rtl"] .om-app .om-select-wrap .om-select {
	padding: 8px 12px 8px 36px;
}

.om-app .om-select-wrap .om-select:hover:not(:disabled) {
	border-color: #9ca3af;
}

.om-app .om-select-wrap .om-select:focus {
	border-color: var(--om-control-accent);
	outline: none;
	box-shadow: 0 0 0 3px var(--om-control-ring);
}

.om-app .om-select-wrap .om-select:disabled {
	background-color: #f3f4f6;
	color: #9ca3af;
	cursor: not-allowed;
}

.om-app .om-select-wrap .om-select-wrap__icon {
	position: absolute;
	top: 50%;
	inset-inline-end: 12px;
	width: 16px;
	height: 16px;
	color: #6b7280;
	pointer-events: none;
	transform: translateY(-50%);
}

.om-select-wrap:focus-within .om-select-wrap__icon {
	color: var(--om-control-accent);
}

.om-app .om-select-wrap.is-enhanced > .om-select {
	opacity: 0;
	pointer-events: none;
}

/* ----- custom dropdown (select.js) ----- */

.om-app {
	--om-select-hover-bg: #eff6ff;
	--om-select-hover-text: #1d4ed8;
	--om-select-selected-bg: #eff6ff;
	--om-select-selected-text: var(--om-blue);
	--om-select-selected-hover-bg: #dbeafe;
}

.om-app .om-custom-select {
	position: absolute;
	inset: 0;
}

.om-app .om-select-trigger {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0 11px 0 12px; /* the arrow sits 12px from the outer edge, as the native control's did (1px border + 11px) */
	border: 1px solid var(--om-control-border);
	border-radius: var(--om-control-radius);
	background: var(--om-control-bg);
	box-shadow: none;
	color: var(--om-control-text);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	text-align: start;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}

[dir="rtl"] .om-app .om-select-trigger {
	padding: 0 12px 0 11px;
}

.om-app .om-select-trigger:hover:not(:disabled) {
	border-color: #9ca3af;
}

.om-app .om-select-trigger:focus,
.om-app .om-custom-select.is-open .om-select-trigger {
	border-color: var(--om-control-accent);
	outline: none;
	box-shadow: 0 0 0 3px var(--om-control-ring);
}

.om-app .om-select-trigger:disabled {
	background: #f3f4f6;
	color: #9ca3af;
	cursor: not-allowed;
}

.om-app .om-select-trigger__text {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.om-app .om-select-trigger__icon {
	flex: none;
	width: 16px;
	height: 16px;
	color: #6b7280;
	pointer-events: none;
	transition: transform .2s var(--om-ease), color .15s;
}

.om-app .om-select-trigger:focus .om-select-trigger__icon,
.om-app .om-custom-select.is-open .om-select-trigger__icon {
	color: var(--om-control-accent);
}

.om-app .om-custom-select.is-open .om-select-trigger__icon {
	transform: rotate(180deg);
}

.om-app .om-select-dropdown {
	position: absolute;
	z-index: 1000;
	top: calc(100% + 4px);
	inset-inline-start: 0;
	box-sizing: border-box;
	min-width: 100%;
	width: max-content;
	max-width: min(360px, calc(100vw - 32px));
	max-height: 240px;
	margin: 0;
	padding: 4px 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	list-style: none;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);
	scrollbar-width: thin;
	scrollbar-color: #d1d5db transparent;
	visibility: hidden;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity .12s, transform .12s, visibility 0s .12s;
}

.om-app .om-custom-select--up .om-select-dropdown {
	top: auto;
	bottom: calc(100% + 4px);
	transform: translateY(4px);
}

.om-app .om-custom-select.is-open .om-select-dropdown {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition-delay: 0s;
}

@supports not (scrollbar-width: thin) {
	.om-app .om-select-dropdown::-webkit-scrollbar {
		width: 8px;
	}

	.om-app .om-select-dropdown::-webkit-scrollbar-thumb {
		border-radius: 4px;
		background: #d1d5db;
	}
}

.om-app .om-select-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 8px 14px;
	color: #374151;
	font-size: 14px;
	line-height: 1.4;
	white-space: nowrap;
	cursor: pointer;
}

.om-app .om-select-item__text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.om-app .om-select-item__check {
	display: none;
	flex: none;
	width: 16px;
	height: 16px;
	color: var(--om-control-accent);
}

.om-app .om-select-item:hover,
.om-app .om-select-item.is-active {
	background: var(--om-select-hover-bg);
	color: var(--om-select-hover-text);
}

.om-app .om-select-item.is-selected {
	background: var(--om-select-selected-bg);
	color: var(--om-select-selected-text);
	font-weight: 600;
}

.om-app .om-select-item.is-selected:hover,
.om-app .om-custom-select.is-keyboard .om-select-item.is-selected.is-active {
	background: var(--om-select-selected-hover-bg);
	color: var(--om-select-hover-text);
}

.om-app .om-select-item.is-selected .om-select-item__check {
	display: block;
}

.om-app .om-select-item.is-disabled {
	color: #9ca3af;
	cursor: not-allowed;
}

.om-app .om-select-item.is-disabled:hover {
	background: transparent;
	color: #9ca3af;
}

@media (prefers-reduced-motion: reduce) {
	.om-app .om-select-dropdown,
	.om-app .om-select-trigger__icon {
		transition: none;
	}
}

/* hour : minute: the two boxes are the same height as every other select, and share the row */
.om-time .om-select-wrap .om-select {
	min-width: 84px;
}

/* ----- text and number fields that sit beside them ----- */

.om-app .om-input {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	width: 100%;
	max-width: 420px;
	height: var(--om-control-height);
	margin: 0;
	padding: 8px 12px;
	border: 1px solid var(--om-control-border);
	border-radius: var(--om-control-radius);
	background-color: var(--om-control-bg);
	box-shadow: none;
	color: var(--om-control-text);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
}

.om-app .om-input--short {
	width: 110px;
}

.om-app .om-input:focus {
	border-color: var(--om-control-accent);
	outline: none;
	box-shadow: 0 0 0 3px var(--om-control-ring);
}

.om-app .om-input[aria-invalid="true"] {
	border-color: var(--om-error);
}

.om-app .om-input:disabled {
	background-color: #f3f4f6;
	color: #9ca3af;
}

/* ----- checkbox ----- */

.om-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 6px 0;
	cursor: pointer;
}

.om-checks .om-check,
.om-advanced__body .om-check {
	display: flex;
}

.om-checkbox {
	position: relative;
	flex: none;
	display: inline-block;
	width: 18px;
	height: 18px;
}

:is(.om-app, .om-modal-backdrop) .om-checkbox input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	display: block;
	width: 18px;
	min-width: 18px;
	height: 18px;
	margin: 0;
	padding: 0;
	border: 1.5px solid var(--om-control-border);
	border-radius: 4px;
	background-color: var(--om-control-bg);
	box-shadow: none;
	cursor: pointer;
	transition: background-color .12s, border-color .12s;
}

/* WordPress draws its own tick with a ::before; two ticks would be one too many */
:is(.om-app, .om-modal-backdrop) .om-checkbox input[type="checkbox"]::before {
	content: none;
}

:is(.om-app, .om-modal-backdrop) .om-checkbox input[type="checkbox"]:hover:not(:disabled):not(:checked) {
	border-color: #9ca3af;
}

:is(.om-app, .om-modal-backdrop) .om-checkbox input[type="checkbox"]:checked {
	border-color: var(--om-control-accent);
	background-color: var(--om-control-accent);
}

:is(.om-app, .om-modal-backdrop) .om-checkbox input[type="checkbox"]:focus-visible {
	border-color: var(--om-control-accent);
	outline: none;
	box-shadow: 0 0 0 3px var(--om-control-ring);
}

:is(.om-app, .om-modal-backdrop) .om-checkbox input[type="checkbox"]:disabled {
	cursor: not-allowed;
	opacity: .5;
}

.om-checkbox__tick {
	position: absolute;
	inset: 3px;
	width: 12px;
	height: 12px;
	color: #fff;
	pointer-events: none;
	stroke-width: 3;
	opacity: 0;
	transition: opacity .1s;
}

.om-checkbox__tick svg {
	width: 100%;
	height: 100%;
}

.om-checkbox input:checked + .om-checkbox__tick {
	opacity: 1;
}

.om-check:has(input:disabled) {
	cursor: not-allowed;
}

/* ---------- Schedules ---------- */

.om-sched {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr);
	overflow: hidden;
}

.om-sched__tabs {
	display: flex;
	flex-direction: column;
	padding: 10px 0;
	border-inline-end: 1px solid var(--om-border);
	background: var(--om-subtle);
}

.om-sched__group {
	margin: 14px 18px 6px;
	padding-top: 12px;
	border-top: 1px solid var(--om-border);
	color: var(--om-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.om-tab {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 10px 18px;
	border: 0;
	border-inline-start: 3px solid transparent;
	background: none;
	color: var(--om-text);
	font: inherit;
	text-align: start;
	cursor: pointer;
}

.om-tab:hover {
	background: var(--om-surface);
}

.om-tab[aria-selected="true"] {
	border-inline-start-color: var(--om-blue);
	background: var(--om-surface);
	color: var(--om-blue);
	font-weight: 600;
}

.om-tab:focus-visible {
	outline: 2px solid var(--om-blue);
	outline-offset: -2px;
}

.om-tab__icon {
	flex: none;
}

.om-tab--soon {
	color: var(--om-muted);
}

.om-tab--soon[aria-selected="true"] {
	color: var(--om-text);
}

.om-badge {
	margin-inline-start: auto;
	padding: 2px 8px;
	border-radius: 999px;
	background: #e2e8f0;
	color: #475569;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.om-sched__panels {
	min-width: 0;
	padding: 24px 28px;
}

.om-panel[hidden] {
	display: none;
}

.om-panel__title {
	margin: 0 0 18px;
	padding: 0;
	font-size: 16px;
	font-weight: 600;
}

.om-panel__footer {
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid var(--om-border);
}

.om-row--switch {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--om-border);
}

.om-row__label {
	display: block;
	font-size: 14px;
	font-weight: 600;
}

.om-row__help {
	margin: 4px 0 0;
	color: var(--om-muted);
	font-size: 13px;
}

/* the on/off switch: a real checkbox on top, drawn as a track */
.om-switch {
	position: relative;
	flex: none;
	display: inline-block;
	width: 44px;
	height: 24px;
}

.om-switch input {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.om-switch__track {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #94a3b8;
	transition: background .15s;
}

.om-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	inset-inline-start: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
	transition: transform .15s;
}

.om-switch input:checked + .om-switch__track {
	background: var(--om-blue);
}

.om-switch input:checked + .om-switch__track::after {
	transform: translateX(20px);
}

[dir="rtl"] .om-switch input:checked + .om-switch__track::after {
	transform: translateX(-20px);
}

.om-switch input:focus-visible + .om-switch__track {
	outline: 2px solid var(--om-blue);
	outline-offset: 2px;
}

.om-opts {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.om-opts.is-off,
.om-opt.is-off,
.om-check.is-off {
	opacity: .5;
}

.om-opt {
	margin-bottom: 18px;
}

.om-opt[hidden] {
	display: none;
}

.om-opt__label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.om-opt__hint {
	margin: 6px 0 0;
	color: var(--om-muted);
	font-size: 12.5px;
}

.om-opt__hint--block {
	margin: 0 0 18px;
	font-size: 13px;
}

.om-time {
	display: flex;
	align-items: center;
	gap: 6px;
}

.om-checks {
	margin: 0 0 8px;
	padding: 0;
	border: 0;
}

.om-check--block {
	align-items: flex-start;
}

.om-check--block .om-checkbox {
	margin-top: 1px; /* the box lines up with the first line of text, not the middle of a two-line label */
}

.om-check small {
	display: block;
	margin-top: 2px;
	color: var(--om-muted);
	font-size: 12px;
}

.om-status {
	margin-top: 8px;
	padding: 14px 16px;
	border: 1px solid var(--om-border);
	border-radius: 8px;
	background: var(--om-subtle);
}

.om-status__line {
	margin: 0;
}

.om-status__line + .om-status__line {
	margin-top: 6px;
	color: var(--om-muted);
}

.om-status__label {
	margin-inline-end: 6px;
	font-weight: 600;
}

.om-status__line--failed,
.om-status__line--skipped {
	color: #a01d1f;
}

.om-status__line--success {
	color: var(--om-ok-ink);
}

.om-btn.is-busy {
	cursor: progress;
	opacity: .8;
}

.om-soon {
	padding: 36px 16px;
	border: 1px dashed var(--om-dashed);
	border-radius: 8px;
	color: var(--om-muted);
	text-align: center;
}

.om-soon__icon {
	width: 40px;
	height: 40px;
	color: var(--om-field);
}

.om-soon__title {
	margin: 10px 0 4px;
	color: var(--om-text);
	font-size: 15px;
	font-weight: 600;
}

.om-soon__text {
	max-width: 380px;
	margin: 0 auto;
}

/* A phone: the tabs become a row along the top that scrolls sideways. */
@media (max-width: 700px) {
	.om-sched {
		grid-template-columns: minmax(0, 1fr);
	}

	.om-sched__tabs {
		flex-direction: row;
		overflow-x: auto;
		padding: 0;
		border-inline-end: 0;
		border-bottom: 1px solid var(--om-border);
	}

	.om-sched__group {
		display: none;
	}

	.om-tab {
		flex: none;
		border-inline-start: 0;
		border-bottom: 3px solid transparent;
		white-space: nowrap;
	}

	.om-tab[aria-selected="true"] {
		border-bottom-color: var(--om-blue);
	}

	.om-sched__panels {
		padding: 18px 16px;
	}
}

/* toasts (outside .om-app, so no theme variables) */
.om-toasts {
	position: fixed;
	inset-inline-end: 20px;
	bottom: 20px;
	z-index: 100001;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: calc(100vw - 32px);
}

.om-toast {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-width: 240px;
	padding: 12px 14px;
	border-radius: 8px;
	background: #14532d;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
	animation: om-toast-in .2s ease-out;
}

.om-toast.is-error {
	background: #8a2424;
}

.om-toast.is-leaving {
	opacity: 0;
	transition: opacity .2s;
}

.om-toast__text {
	flex: 1;
}

.om-toast__close {
	min-width: 24px;
	min-height: 24px;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

@keyframes om-toast-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
}

@media (max-width: 600px) {
	.om-toasts {
		inset-inline: 16px;
		bottom: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.om-app *,
	.om-modal-backdrop,
	.om-modal-backdrop *,
	.om-toast {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
	}

	/* A spinner that never moves looks broken; show a steady ring instead. */
	.om-spinner {
		border-top-color: var(--om-blue);
		border-right-color: var(--om-blue);
	}
}

@media (max-width: 600px) {
	.om-accordion > summary,
	.om-accordion__body,
	.om-find,
	.om-actions { padding-inline: 14px; }
	.om-drop,
	.om-empty { margin: 14px; padding: 32px 14px; }
	.om-note { margin: 0 14px 14px; }
	.om-modal { padding: 22px 18px 18px; }
	.om-banner { flex-direction: column; align-items: stretch; }
	.om-find__head { padding: 12px; }
	.om-find__body { padding: 2px 12px 12px; }
	.om-table th,
	.om-table td { padding-inline: 12px; }
	.om-table__actions { white-space: normal; }

	/* On a phone the table must fit the card, or the actions end up off-screen. The size goes (it is
	   on the file's download and in the archive), the date may wrap and the name breaks anywhere. */
	.om-table th:nth-child(3),
	.om-table td:nth-child(3),
	.om-table__icon { display: none; }
	.om-table th:first-child,
	.om-table td:first-child { width: auto; }
	.om-table td:nth-child(2) { white-space: normal; }
	.om-table__name { min-width: 0; overflow-wrap: anywhere; }
	.om-table__actions .om-btn { margin-inline-start: 4px; }
}

/* ---------- live progress: current step, heartbeat, activity log ---------- */

.om-live {
	margin-top: 14px;
}

.om-live__line {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	margin: 0 0 8px;
	font-size: 13px;
	color: #334155;
}

.om-live__phase {
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--om-blue-tint);
	color: var(--om-blue);
	box-shadow: inset 0 0 0 1px var(--om-blue-border);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.om-live__phase[data-phase="error"] {
	background: #fdecec;
	color: var(--om-error);
}

.om-live__phase:empty {
	display: none;
}

.om-live__step {
	min-width: 0;
	overflow-wrap: anywhere;
}

.om-progress--thin {
	height: 6px;
}

.om-live__meta {
	margin: 8px 0 0;
	color: #64748b;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

.om-live__stall,
.om-live__lost {
	margin: 10px 0 0;
	padding: 8px 12px;
	border-left: 3px solid #d97706;
	border-radius: 4px;
	background: #fff7ed;
	color: #92400e;
	font-size: 12.5px;
	line-height: 1.45;
}

.om-live__lost {
	border-left-color: #64748b;
	background: #f1f5f9;
	color: #475569;
}

.om-live__stall[hidden],
.om-live__lost[hidden] {
	display: none;
}

.om-live__details {
	margin-top: 12px;
}

.om-live__details > summary {
	cursor: pointer;
	color: #475569;
	font-size: 12.5px;
	font-weight: 600;
}

.om-live__log {
	max-height: 180px;
	margin: 8px 0;
	padding: 10px 12px;
	overflow: auto;
	border-radius: 6px;
	background: #0f172a;
	color: #cbd5e1;
	font: 11.5px/1.5 Consolas, Monaco, monospace;
	white-space: pre-wrap;
	word-break: break-word;
}

.om-live__log:focus-visible {
	outline: 2px solid var(--om-blue);
	outline-offset: 2px;
}

.om-live__copy {
	margin-top: 2px;
	padding: 0 14px;
	letter-spacing: .04em;
}

.om-live__copy:hover:not(:disabled),
.om-live__copy:focus-visible {
	border-color: var(--om-blue);
	background: var(--om-blue-tint);
	color: var(--om-blue);
}

/* ---------- restore dialog: advanced find & replace ---------- */

.om-fr {
	margin-top: 14px;
	text-align: left;
}

.om-fr > summary {
	cursor: pointer;
	color: #475569;
	font-size: 12.5px;
	font-weight: 600;
}

.om-fr__help {
	margin: 8px 0 10px;
	color: #64748b;
	font-size: 12px;
	line-height: 1.5;
}

.om-fr__rows {
	display: grid;
	gap: 8px;
}

.om-fr__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 6px;
}

.om-fr__row input[type="text"] {
	min-width: 0;
	min-height: 34px;
	padding: 4px 8px;
	border: 1px solid var(--om-field);
	border-radius: 6px;
	font-size: 12.5px;
	box-shadow: none;
}

.om-fr__row input[type="text"]:focus {
	border-color: var(--om-blue);
	outline: 0;
	box-shadow: 0 0 0 3px rgba(var(--om-blue-rgb), .25);
}

.om-fr__row input[aria-invalid="true"] {
	border-color: var(--om-error);
}

.om-fr__exactlabel {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	color: #64748b;
	font-size: 11.5px;
	white-space: nowrap;
	cursor: pointer;
}

.om-fr__remove {
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #64748b;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.om-fr__remove:hover,
.om-fr__remove:focus-visible {
	background: #fdecec;
	color: var(--om-error);
}

.om-fr__error {
	margin: 8px 0 0;
	color: var(--om-error);
	font-size: 12.5px;
	font-weight: 600;
}

.om-fr__error[hidden] {
	display: none;
}

.om-fr__add {
	margin-top: 10px;
	padding: 0 14px;
	letter-spacing: .04em;
}

.om-fr__add:hover:not(:disabled),
.om-fr__add:focus-visible {
	border-color: var(--om-blue);
	background: var(--om-blue-tint);
	color: var(--om-blue);
}

@media (max-width: 600px) {
	.om-fr__row {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.om-fr__row input[type="text"] {
		grid-column: 1 / -1;
	}
}
