/* ──────────────────────────────────────────────────────────────────
 * SEOPress shared UI primitives
 *
 * Imported once by `ui/index.js`. Each shared admin page picks up the
 * styles transitively through its `import` of any UI primitive.
 *
 * Conventions:
 *   - all classes prefixed with `seopress-ui-`
 *   - accent color follows --wp-admin-theme-color (user's WP scheme)
 *   - semantic colors use the WP admin notice palette (#008a20 success,
 *     #bd8600 warning, #d63638 error) for text-on-tint contrast
 *   - state modifiers use `is-*` (e.g. `is-active`, `is-warning`)
 * ────────────────────────────────────────────────────────────────── */

/* ── Badge ── */

.seopress-ui-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
	color: var(--wp-admin-theme-color);
	white-space: nowrap;
}

.seopress-ui-badge--pill {
	border-radius: 999px;
	padding: 2px 10px;
}

.seopress-ui-badge--uppercase {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.seopress-ui-badge.is-success {
	background: rgba( 74, 184, 102, 0.15 );
	color: #008a20;
}

.seopress-ui-badge.is-warning {
	background: rgba( 255, 186, 0, 0.15 );
	color: #bd8600;
}

.seopress-ui-badge.is-low-alert {
	background: rgba( 227, 159, 72, 0.18 );
	color: var(--colorLowAlert, #e39f48);
}

.seopress-ui-badge.is-alert {
	background: rgba( 235, 15, 0, 0.10 );
	color: var(--colorAlert, #eb0f00);
}

.seopress-ui-badge.is-primary {
	background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
	color: var(--wp-admin-theme-color);
}

.seopress-ui-badge.is-muted {
	background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
	color: var(--color, #757575);
}

.seopress-ui-badge.is-neutral {
	background: var(--borderColor, #E6E6E8);
	color: var(--colorDark, #1e1e1e);
}

/* Solid variants used as full-color "tag" badges (white text on a solid
 * background). Useful for "DEPRECATED", "REQUIRED", small status chips
 * inside template/schema cards. */
.seopress-ui-badge--solid.is-low-alert {
	background: var(--colorLowAlert, #e39f48);
	color: var(--colorWhite, #fff);
}

.seopress-ui-badge--solid.is-alert {
	background: var(--colorAlert, #eb0f00);
	color: var(--colorWhite, #fff);
}

.seopress-ui-badge--solid.is-warning {
	background: var(--colorWarning, #ffba00);
	color: var(--colorDark, #1e1e1e);
}

/* ── Link (cell title) ──
 * Inline / cell-title links follow the WP admin theme color so they
 * match the user's chosen scheme. */

.seopress-ui-link {
	color: var(--wp-admin-theme-color);
	text-decoration: none;
	font-weight: 600;
}

.seopress-ui-link:hover,
.seopress-ui-link:focus {
	color: var(--wp-admin-theme-color);
	text-decoration: underline;
}

.seopress-ui-link--truncate {
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: middle;
}

.seopress-ui-link--muted {
	color: var(--colorDark, #1e1e1e);
	font-weight: 500;
}

.seopress-ui-link--muted:hover,
.seopress-ui-link--muted:focus {
	color: var(--wp-admin-theme-color);
	text-decoration: underline;
}

/* ── Progress bar label & hint — render below native <ProgressBar> ── */

.seopress-ui-progress__label {
	margin: 8px 0 0;
	font-size: 13px;
	font-weight: 500;
	color: var(--colorDark, #1e1e1e);
}

.seopress-ui-progress__hint {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--color, #757575);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ── Empty state ── */

.seopress-ui-empty-state {
	width: 100%;
	margin: 16px 0;
	padding: 48px 24px;
	text-align: center;
	background: #fff;
	border: 1px solid var(--borderColor, #E6E6E8);
	border-radius: 6px;
}

.seopress-ui-empty-state__title {
	margin: 0 0 8px;
	font-size: 18px;
	color: var(--colorDark, #1e1e1e);
}

.seopress-ui-empty-state__desc {
	margin: 0 auto 16px;
	max-width: 480px;
	color: var(--color, #757575);
	font-size: 14px;
}

/* ── DataView page wrapper ── */

.seopress-ui-dataview-wrapper {
	margin: 20px 20px 20px 0;
}

/* ── Editor toggle field (header "enabled" toggle) ── */

.seopress-ui-editor-toggle {
	margin: 0 !important;
	padding: 0 8px !important;
	border-right: 1px solid var(--borderColor, #E6E6E8);
}

.seopress-ui-editor-toggle .components-toggle-control__label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

@media screen and ( max-width: 600px ) {
	.seopress-ui-editor-toggle {
		padding-left: 0 !important;
	}
}

/* ── Dirty badge (modified state) ── */

.seopress-ui-dirty-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 4px;
	background: var(--colorWarning, #ffba00);
	color: var(--colorDark, #1e1e1e);
	letter-spacing: 0.3px;
}

/* ── Tabs (lightweight tablist) ──
 * Visual parity with `@wordpress/components` `<TabPanel>` so the shared
 * shell tabs (Site Audit) match the WP-native tabs used by other admin
 * pages (Redirections, etc.). The underline lives on a `::after` ribbon
 * that grows from 0 to 1.5px on the active tab — same mechanic as WP
 * core, coloured with --wp-admin-theme-color. */

.seopress-ui-tabs {
	display: flex;
	align-items: stretch;
	flex-direction: row;
	margin-bottom: 20px;
}

.seopress-ui-tabs__tab {
	position: relative;
	-webkit-appearance: none;
	   -moz-appearance: none;
	        appearance: none;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	height: 48px;
	margin: 0;
	padding: 3px 16px;
	font: inherit;
	font-weight: 400;
	color: var(--colorDark, #1e1e1e);
	cursor: pointer;
	transition: color 0.1s linear;
}

.seopress-ui-tabs__tab:hover {
	color: var(--wp-admin-theme-color);
	background: transparent;
}

.seopress-ui-tabs__tab::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	pointer-events: none;
	background: var(--wp-admin-theme-color);
	height: 0;
	transition: height 0.1s linear;
}

.seopress-ui-tabs__tab.is-active {
	color: var(--wp-admin-theme-color);
	font-weight: 500;
}

.seopress-ui-tabs__tab.is-active::after {
	height: 1.5px;
}

.seopress-ui-tabs__tab:focus-visible {
	outline: 2px solid var(--wp-admin-theme-color);
	outline-offset: -2px;
}

/* ── Modal action footer (flex-end) ── */

.seopress-ui-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 16px;
}

/* ──────────────────────────────────────────────────────────────────
 * Shared styles for SEOPress PRO DataViews admin pages
 * (schemas, redirections, broken links).
 *
 * Each page imports this stylesheet at the top of its own styles.css.
 * Page-specific styles (badges, sidebars, modals…) stay in the per-page
 * file with the page-prefixed selectors.
 * ──────────────────────────────────────────────────────────────────── */

/* ── License notice positioning override ──
 * `.seopress-notice` (rendered above the page wrap by Free) ships with
 * `position: relative; top: 85px; left: 25px;` — a legacy offset designed
 * to overlay the old jQuery admin header. On the React DataViews pages
 * that offset pushes the notice down into the sticky page header, leaving
 * the notice and the breadcrumb panel visually overlapping. Reset the
 * offset whenever a DataViews page is on screen so the notice flows
 * normally above the wrap. */

.seopress-notice {
	top: 0;
	left: 0;
	width: auto;
	margin: 16px 20px;
}

/* ── Page Header (sticky) ── */

.seopress-dataviews-page-header {
	position: sticky;
	top: 32px; /* WP admin bar height */
	z-index: 50;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	padding: 12px 16px;
	margin-bottom: 20px;
	background: #fff;
	border: 1px solid var(--borderColor, #E6E6E8);
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.04 );
}

@media screen and (max-width: 782px) {
	.seopress-dataviews-page-header {
		top: 46px; /* Mobile WP admin bar is taller */
	}
}

body:not(.admin-bar) .seopress-dataviews-page-header {
	top: 0;
}

/* ── Breadcrumb ── */

.seopress-dataviews-breadcrumb {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	flex: 1 1 240px;
	min-width: 0;
	font-size: 14px;
	color: var(--color, #757575);
	overflow: hidden;
}

.seopress-dataviews-breadcrumb__item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
}

.seopress-dataviews-breadcrumb__item:not(:last-child) {
	flex-shrink: 0;
}

.seopress-dataviews-breadcrumb__item:last-child {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

.seopress-dataviews-breadcrumb__link {
	color: var(--wp-admin-theme-color);
	text-decoration: none;
	font-weight: 500;
	white-space: nowrap;
}

.seopress-dataviews-breadcrumb__link:hover {
	text-decoration: underline;
}

.seopress-dataviews-breadcrumb__current {
	display: block;
	color: var(--colorDark, #1e1e1e);
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
	max-width: 100%;
}

.seopress-dataviews-breadcrumb__separator {
	color: var(--borderColor, #E6E6E8);
	margin: 0 2px;
	flex-shrink: 0;
}

.seopress-dataviews-page-header__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	flex: 0 1 auto;
	justify-content: flex-end;
}

@media screen and (max-width: 600px) {
	.seopress-dataviews-breadcrumb {
		flex: 1 1 100%;
	}

	.seopress-dataviews-page-header__actions {
		flex: 1 1 100%;
		justify-content: flex-start;
	}
}

/* ── Snackbar list (portal to body, fixed bottom-right) ──
 *
 * WordPress core sets .components-snackbar-list { position: absolute; width: 100%; }
 * which would otherwise stretch the container across the screen and push
 * notices over the admin sidebar. Re-pin it bottom-right with explicit
 * width: auto so the toast hugs its content.
 *
 * Bottom offset is exposed as a CSS variable so the value tracks any
 * future change (taller chat widget, mobile breakpoint, etc.) from a
 * single place. Default 100px clears a typical bottom-right chat
 * widget (~60-80px tall when collapsed) while keeping the toast in the
 * eye-line near the save action.
 */
:root {
	--seopress-ui-snackbar-bottom-offset: 100px;
}

.components-snackbar-list.seopress-dataviews-snackbar-list {
	position: fixed !important;
	bottom: var( --seopress-ui-snackbar-bottom-offset, 100px ) !important;
	right: 24px !important;
	left: auto !important;
	top: auto !important;
	width: auto !important;
	max-width: calc( 100vw - 48px );
	z-index: 100000 !important;
}

.components-snackbar-list.seopress-dataviews-snackbar-list .components-snackbar {
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.15 );
}

/* ── Delete confirmation modal ── */

.seopress-dataviews-delete-modal p {
	margin: 0 0 16px;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.seopress-dataviews-delete-modal__actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 8px;
}

/* ── Row actions dropdown cursor ──
 *
 * The DataViews row-actions dropdown renders Menu.Item elements whose
 * styled component uses `all: unset`, which also wipes the cursor. Target
 * the menu items by role (emotion class hashes are unstable) and force
 * a pointer cursor so hovered rows feel clickable.
 */
[role="menuitem"]:not( [aria-disabled="true"] ),
[role="menuitemradio"]:not( [aria-disabled="true"] ),
[role="menuitemcheckbox"]:not( [aria-disabled="true"] ) {
	cursor: pointer !important;
}

.seopress-schemas-dataview-wrapper {
	margin: 20px 20px 20px 0;
}

.seopress-schemas-rules {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--color, #757575);
	font-size: 13px;
	line-height: 1.4;
	max-width: 100%;
}

/* Spacing tweak when the deprecated badge sits next to the type badge. */
.seopress-schemas-deprecated-badge {
	margin-left: 6px;
	vertical-align: middle;
}

/* ── Bulk action: Delete (destructive) ── */
/*
 * @wordpress/dataviews does not yet forward `isDestructive` to the bulk
 * action toolbar, so we re-color the buttons that have a visible label
 * (the Cancel icon-only button has aria-label="Cancel" — we exclude it).
 */
.seopress-schemas-dataview-wrapper .dataviews-bulk-actions-footer__action-buttons > .components-button:not([aria-label]) {
	color: var(--colorAlert, #eb0f00);
	box-shadow: inset 0 0 0 1px var(--colorAlert, #eb0f00);
}

.seopress-schemas-dataview-wrapper .dataviews-bulk-actions-footer__action-buttons > .components-button:not([aria-label]):hover:not(:disabled),
.seopress-schemas-dataview-wrapper .dataviews-bulk-actions-footer__action-buttons > .components-button:not([aria-label]):focus:not(:disabled) {
	background: var(--colorAlert, #eb0f00);
	color: #fff;
	box-shadow: inset 0 0 0 1px var(--colorAlert, #eb0f00);
}

/* ── Schema Editor ── */

.seopress-schema-editor {
	margin: 20px 20px 20px 0;
}

/* ── Editor layout with optional preview aside ── */

.seopress-schema-editor__layout {
	display: block;
}

.seopress-schema-editor__layout.has-preview {
	display: grid;
	grid-template-columns: minmax(0, 1fr) clamp( 360px, 30vw, 420px );
	gap: 20px;
	align-items: start;
}

.seopress-schema-editor__main {
	min-width: 0;
}

.seopress-schema-editor__aside {
	position: sticky;
	top: 110px; /* 32 (admin bar) + ~70 (page header height + margin) */
	max-height: calc( 100vh - 130px );
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.seopress-schema-editor__aside-section {
	background: #fff;
	border: 1px solid var(--borderColor, #E6E6E8);
	overflow: hidden;
	box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.03 );
	flex-shrink: 0;
}

.seopress-schema-editor__aside-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 14px 16px;
	font-size: 13px;
	font-weight: 600;
	color: var(--colorDark, #1e1e1e);
	background: #fff;
	border-bottom: 1px solid var(--borderColorLight, #e0e0e0);
}

.seopress-schema-editor__aside-title .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: var(--wp-admin-theme-color);
}

.seopress-schema-editor__aside-section .seopress-matching-posts {
	margin: 0;
	border-left: none;
	border-radius: 0;
	background: #fff;
}

.seopress-schema-editor__aside-section .seopress-matching-posts.is-success {
	background: #f4fbf6;
}

.seopress-schema-editor__aside-section .seopress-matching-posts.is-empty {
	background: #fffaed;
}

.seopress-schema-editor__aside-picker {
	padding: 12px 16px;
	background: #fff;
	border-bottom: 1px solid var(--borderColorLight, #e0e0e0);
}

.seopress-schema-editor__aside-picker .components-base-control {
	margin-bottom: 0 !important;
}

.seopress-schema-editor__aside-section .seopress-jsonld-preview {
	border: none;
	border-radius: 0;
}

.seopress-schema-editor__aside-section .seopress-jsonld-preview__header {
	display: none;
}

.seopress-schema-editor__aside-section .seopress-jsonld-preview__toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	padding: 8px 12px;
	background: #fafafa;
	border-bottom: 1px solid var(--borderColor, #E6E6E8);
}

@media (max-width: 1200px) {
	.seopress-schema-editor__layout.has-preview {
		grid-template-columns: 1fr;
	}
	.seopress-schema-editor__aside {
		position: static;
		max-height: none;
	}
}

/* ── Matching posts preview ── */

.seopress-matching-posts {
	margin-top: 16px;
	padding: 10px 12px;
	font-size: 13px;
	border-left: 3px solid var(--borderColor, #E6E6E8);
	background: #fafafa;
}

.seopress-matching-posts.is-success {
	border-left-color: var(--colorSuccess, #4ab866);
	background: #f4fbf6;
}

.seopress-matching-posts.is-empty {
	border-left-color: var(--colorWarning, #ffba00);
	background: #fffaed;
	display: flex;
	align-items: center;
	gap: 8px;
}

.seopress-matching-posts.is-loading {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--color, #757575);
}

.seopress-matching-posts__count {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 6px;
}

.seopress-matching-posts__count .dashicons-yes-alt {
	color: var(--colorSuccess, #4ab866);
}

.seopress-matching-posts.is-empty .dashicons-warning {
	color: var(--colorWarning, #ffba00);
}

.seopress-matching-posts__samples {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
	font-size: 12px;
}

.seopress-matching-posts__samples li {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 2px 0;
	margin: 0;
}

.seopress-matching-posts__type {
	font-size: 10px;
	padding: 1px 6px;
	background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
	color: var(--wp-admin-theme-color);
	border-radius: 3px;
	font-weight: 500;
}

.seopress-matching-posts__more {
	color: var(--color, #757575);
	font-style: italic;
}

/* ── JSON-LD preview ── */

.seopress-jsonld-preview {
	background: #fff;
	border: 1px solid var(--borderColor, #E6E6E8);
	overflow: hidden;
}

.seopress-jsonld-preview__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 12px;
	background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
	border-bottom: 1px solid var(--borderColor, #E6E6E8);
	font-size: 13px;
}

.seopress-jsonld-preview__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.seopress-jsonld-preview__code {
	margin: 0;
	padding: 12px;
	background: #1e1e1e;
	color: #e0e0e0;
	font-family: Menlo, Monaco, "Courier New", monospace;
	font-size: 11px;
	line-height: 1.5;
	overflow-x: auto;
	max-height: 60vh;
}

.seopress-jsonld-preview__hint {
	margin: 0;
	padding: 8px 12px;
	font-size: 11px;
	color: var(--color, #757575);
	background: #fafafa;
	border-top: 1px solid var(--borderColor, #E6E6E8);
}

.seopress-jsonld-preview__empty {
	padding: 24px;
	text-align: center;
	color: var(--color, #757575);
	font-size: 13px;
	background: #fff;
	border: 1px solid var(--borderColor, #E6E6E8);
}

/* ── Template Picker ── */

.seopress-template-picker {
	background: #fff;
	border: 1px solid var(--borderColor, #E6E6E8);
	padding: 24px;
}

.seopress-template-picker__header {
	margin-bottom: 20px;
}

.seopress-template-picker__header h2 {
	margin: 0 0 4px;
	font-size: 18px;
	color: var(--colorDark, #1e1e1e);
}

.seopress-template-picker__header p {
	margin: 0;
	color: var(--color, #757575);
	font-size: 13px;
}

.seopress-template-picker__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
}

.seopress-template-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	padding: 16px;
	background: #fff;
	border: 2px solid var(--borderColor, #E6E6E8);
	cursor: pointer;
	text-align: left;
	transition: all 0.15s;
	font-family: inherit;
}

.seopress-template-card:hover {
	border-color: var(--wp-admin-theme-color);
	background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
	transform: translateY(-1px);
}

.seopress-template-card .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: var(--wp-admin-theme-color);
}

.seopress-template-card__label {
	font-size: 14px;
	font-weight: 600;
	color: var(--colorDark, #1e1e1e);
}

.seopress-template-card__desc {
	font-size: 12px;
	color: var(--color, #757575);
	line-height: 1.4;
}

.seopress-template-picker__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 20px;
}

.seopress-template-filter {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 500;
	font-family: inherit;
	border: 1px solid var(--borderColor, #E6E6E8);
	background: #fff;
	color: var(--colorDark, #1e1e1e);
	border-radius: 20px;
	cursor: pointer;
	transition: all 0.15s;
}

.seopress-template-filter:hover {
	border-color: var(--wp-admin-theme-color);
	color: var(--wp-admin-theme-color);
}

.seopress-template-filter.is-active {
	background: var(--wp-admin-theme-color);
	border-color: var(--wp-admin-theme-color);
	color: #fff;
}

.seopress-template-filter.is-active .dashicons {
	color: #fff;
}

.seopress-template-filter.is-deprecated {
	opacity: 0.6;
}

.seopress-template-filter.is-deprecated.is-active {
	opacity: 1;
	background: var(--colorLowAlert, #e39f48);
	border-color: var(--colorLowAlert, #e39f48);
}

.seopress-template-filter .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	color: var(--wp-admin-theme-color);
}

.seopress-template-filter__badge {
	font-size: 8px;
	font-weight: 600;
	text-transform: uppercase;
	padding: 1px 4px;
	background: var(--colorLowAlert, #e39f48);
	color: #fff;
	border-radius: 3px;
	letter-spacing: 0.3px;
}

.seopress-template-filter.is-active .seopress-template-filter__badge {
	background: rgba(255, 255, 255, 0.3);
}

.seopress-template-picker__footer {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--borderColorLight, #e0e0e0);
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
}

/* ── Custom Schema Field ── */

.seopress-custom-schema-field__validation {
	margin-top: 8px;
}

.seopress-custom-schema-field__validation .components-notice {
	margin: 0;
	padding: 8px 12px;
}

.seopress-custom-schema-field__textarea textarea {
	font-family: Menlo, Monaco, "Courier New", monospace;
	font-size: 12px;
}

/* ── Opening Hours widget ── */

.seopress-opening-hours__desc {
	margin: 0 0 12px;
	font-size: 12px;
	color: var(--color, #757575);
}

.seopress-opening-hours__days {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.seopress-opening-hours__day {
	padding: 12px;
	border: 1px solid var(--borderColor, #E6E6E8);
	background: #fafafa;
}

.seopress-opening-hours__day.is-closed {
	opacity: 0.6;
}

.seopress-opening-hours__day-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--borderColorLight, #e0e0e0);
}

.seopress-opening-hours__day-header strong {
	font-size: 13px;
	color: var(--colorDark, #1e1e1e);
}

.seopress-opening-hours__slots {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.seopress-oh-range.is-disabled {
	opacity: 0.5;
	pointer-events: none;
}

.seopress-oh-times {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 6px;
	padding-left: 38px;
	flex-wrap: wrap;
}

.seopress-oh-times__label {
	font-size: 12px;
	color: var(--color, #757575);
	margin-right: 4px;
}

.seopress-oh-times .components-base-control {
	margin: 0 !important;
}

.seopress-oh-times .components-select-control__input {
	min-width: 56px !important;
	padding-right: 24px !important;
}

.seopress-schema-editor__validation-notice {
	margin: 0 0 16px !important;
}

/* ── Schema Type Selector ── */

.seopress-schema-type-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 8px;
}

.seopress-schema-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 16px 8px;
	border: 2px solid var(--borderColor, #E6E6E8);
	cursor: pointer;
	text-align: center;
	transition: border-color 0.15s, background 0.15s;
	position: relative;
}

.seopress-schema-card:hover {
	border-color: var(--wp-admin-theme-color);
	background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
}

.seopress-schema-card.is-selected {
	border-color: var(--wp-admin-theme-color);
	background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
}

.seopress-schema-card.is-deprecated {
	opacity: 0.6;
}

.seopress-schema-card__radio {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.seopress-schema-card .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: var(--wp-admin-theme-color);
}

.seopress-schema-card__label {
	font-size: 12px;
	font-weight: 500;
	color: var(--colorDark, #1e1e1e);
}

.seopress-schema-card__badge {
	position: absolute;
	top: 4px;
	right: 4px;
	font-size: 9px;
	padding: 1px 5px;
	background: var(--colorLowAlert, #e39f48);
	color: #fff;
	border-radius: 3px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.seopress-schema-type-category__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.seopress-schema-type-category__header .seopress-schema-type-category__title {
	margin: 0;
}

.seopress-schema-type-category__notice {
	margin: 0 0 12px !important;
}

.seopress-schema-type-category.is-deprecated {
	padding-top: 12px;
	border-top: 1px solid var(--borderColorLight, #e0e0e0);
}

/* ── Rules Builder ── */

.seopress-rules-builder {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.seopress-rules-group {
	padding: 12px;
	border: 1px solid var(--borderColor, #E6E6E8);
	background: #fafafa;
}

.seopress-rules-row {
	margin-bottom: 8px;
}

.seopress-rules-row:last-child {
	margin-bottom: 0;
}

.seopress-rules-and,
.seopress-rules-or {
	display: block;
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--color, #757575);
	padding: 4px 0;
}

.seopress-rules-or {
	padding: 8px 0;
}

.seopress-rules-add-group {
	align-self: flex-start;
}

.seopress-rules-desc {
	margin: 0 0 12px;
	color: var(--color, #757575);
	font-size: 13px;
}

/* ── Mapping Field ── */

.seopress-mapping-field {
	padding: 12px 0;
	border-bottom: 1px solid var(--borderColorLight, #e0e0e0);
}

.seopress-mapping-field:last-child {
	border-bottom: none;
}

.seopress-mapping-field__desc {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--color, #757575);
}

.seopress-schema-property {
	margin-left: 6px;
	font-size: 11px;
	padding: 1px 5px;
	background: #f0f0f0;
	border-radius: 3px;
}

.seopress-mapping-upload-btn {
	margin-top: 24px;
}

.seopress-cf-hidden {
	color: var(--color, #757575);
	font-style: italic;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.seopress-cf-hidden .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

/* ── Schema Notices ── */

.seopress-schema-notices {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
}

.seopress-schema-notices .components-notice {
	margin: 0;
}

.seopress-properties-desc {
	margin: 0 0 12px;
	font-size: 13px;
}

/* ── Schema Type Selector categories ── */

.seopress-schema-type-selector {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.seopress-schema-type-category__title {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--color, #757575);
}

/* ── Schema sections (property groups) ── */

.seopress-schema-section {
	margin-bottom: 20px;
}

.seopress-schema-section:last-child {
	margin-bottom: 0;
}

.seopress-schema-section__title {
	margin: 0 0 8px;
	padding: 6px 10px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--wp-admin-theme-color);
	background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
	border-radius: 4px;
}

/* ── Mapping field: label, dot, required badge ── */

.seopress-mapping-field__label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.seopress-mapping-field__dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--borderColor, #E6E6E8);
	flex-shrink: 0;
}

.seopress-mapping-field__dot.is-mapped {
	background: var(--colorSuccess, #4ab866);
}

.seopress-mapping-field__required {
	display: inline-block;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	padding: 1px 6px;
	border-radius: 3px;
	background: var(--colorAlert, #eb0f00);
	color: #fff;
	letter-spacing: 0.3px;
}

.seopress-mapping-field.is-required-empty {
	position: relative;
}

.seopress-mapping-field.is-required-empty::before {
	content: '';
	position: absolute;
	left: -12px;
	top: 16px;
	bottom: 16px;
	width: 2px;
	background: var(--colorAlert, #eb0f00);
	border-radius: 1px;
}

/* ── Schema Guide (sidebar) ── */

.seopress-schema-guide {
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.seopress-schema-guide__description {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--colorDark, #1e1e1e);
}

.seopress-schema-guide__benefit {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	font-size: 12px;
	font-weight: 500;
	color: var(--colorSuccess, #4ab866);
	line-height: 1.4;
}

.seopress-schema-guide__benefit .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: var(--colorSuccess, #4ab866);
	flex-shrink: 0;
	margin-top: 0;
}

.seopress-schema-guide__required {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.seopress-schema-guide__subtitle {
	margin: 0;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--color, #757575);
}

.seopress-schema-guide__checklist {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.seopress-schema-guide__checklist-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--colorDark, #1e1e1e);
	margin: 0;
	padding: 0;
}

.seopress-schema-guide__checklist-item .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

.seopress-schema-guide__checklist-item.is-mapped .dashicons {
	color: var(--colorSuccess, #4ab866);
}

.seopress-schema-guide__checklist-item.is-missing .dashicons {
	color: var(--colorAlert, #eb0f00);
}

.seopress-schema-guide__links {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-top: 4px;
	border-top: 1px solid var(--borderColorLight, #e0e0e0);
}

.seopress-schema-guide__link {
	font-size: 12px;
	color: var(--wp-admin-theme-color);
	text-decoration: none;
	font-weight: 500;
}

.seopress-schema-guide__link:hover {
	text-decoration: underline;
}

