/**
 * Signocore Multilanguage - Admin Stylesheet
 *
 * @package Signocore\Multilanguage
 */

/* ----------------------------------------------------------------
 * Variables (aligned with signocore-seo design tokens)
 * ---------------------------------------------------------------- */
:root {
	/* Brand */
	--sml-brand: #b8642a;
	--sml-brand-hover: #9e5524;
	--sml-brand-light: #f5ece4;

	/* Primary */
	--sml-primary: #546e7a;
	--sml-primary-hover: #465c66;

	/* Semantic */
	--sml-green: #00a32a;
	--sml-green-bg: #edfaef;
	--sml-orange: #dba617;
	--sml-orange-bg: #fef8e7;
	--sml-blue: #2271b1;
	--sml-blue-bg: #e7f2fa;
	--sml-red: #d63638;
	--sml-success: #15803d;
	--sml-warning: #b45309;
	--sml-error: #b91c1c;

	/* Neutrals */
	--sml-gray-50: #f8fafc;
	--sml-gray-100: #f1f5f9;
	--sml-gray-200: #e2e8f0;
	--sml-gray-300: #cbd5e1;
	--sml-gray-400: #94a3b8;
	--sml-gray-500: #64748b;
	--sml-gray-600: #475569;
	--sml-gray-700: #334155;
	--sml-gray-800: #1e293b;
	--sml-gray: #787c82;
	--sml-gray-bg: #f0f0f1;

	/* Borders & Radius */
	--sml-border: #e2e8f0;
	--sml-radius: 4px;
	--sml-radius-lg: 8px;

	/* Shadows */
	--sml-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
	--sml-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
	--sml-shadow-focus: 0 0 0 3px rgba(84, 110, 122, 0.15);

	/* Transitions */
	--sml-transition: 150ms ease;
}

/* ----------------------------------------------------------------
 * Admin notices
 * ---------------------------------------------------------------- */
.sml-notice {
	border-left-color: var(--sml-brand);
}

.sml-notice .sml-notice-title {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.sml-notice a {
	color: var(--sml-brand);
}

.sml-notice a:hover {
	color: var(--sml-brand-hover);
}

/* ----------------------------------------------------------------
 * Page header
 * ---------------------------------------------------------------- */
h1.sml-page-title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 9px 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--sml-gray-800);
	line-height: 1;
}

h1.sml-page-title .sml-version {
	flex-shrink: 0;
	font-size: 10px;
	font-weight: 500;
	color: var(--sml-gray-500);
	background: var(--sml-gray-100);
	padding: 3px 8px;
	border-radius: 9999px;
	line-height: 1;
	margin-top: -2px;
}

/* Legacy header compat */
.sml-page-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 20px 0 16px;
}

.sml-page-header h1 {
	margin: 0;
	padding: 0;
}

.sml-page-header .sml-version {
	font-size: 12px;
	color: var(--sml-gray);
	background: var(--sml-gray-bg);
	padding: 2px 8px;
	border-radius: 10px;
}

/* ----------------------------------------------------------------
 * Card component
 * ---------------------------------------------------------------- */
.sml-card {
	background: #fff;
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius-lg);
	box-shadow: var(--sml-shadow-sm);
	margin-bottom: 24px;
	transition: box-shadow var(--sml-transition);
}

.sml-card:hover {
	box-shadow: var(--sml-shadow-md);
}

.sml-card-header {
	background: var(--sml-gray-50);
	padding: 14px 20px;
	border-bottom: 2px solid var(--sml-border);
	border-radius: var(--sml-radius-lg) var(--sml-radius-lg) 0 0;
}

.sml-card-header h2,
.sml-card-header h3 {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: var(--sml-gray-800);
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.sml-card-body {
	padding: 20px;
}

/* ----------------------------------------------------------------
 * Tab navigation (signocore-seo style)
 * ---------------------------------------------------------------- */
h2.nav-tab-wrapper.sml-tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 4px;
	border-bottom: 1px solid var(--sml-gray-300);
	padding-bottom: 8px;
	margin-bottom: 16px;
}

.nav-tab-wrapper.sml-tabs .nav-tab {
	border: 0;
	margin: 0;
	padding: 8px 16px;
	background: transparent;
	color: var(--sml-gray-600);
	border-radius: 6px;
	transition: color var(--sml-transition), background-color var(--sml-transition);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	float: none;
	font-weight: 500;
	font-size: 0.875rem;
}

.nav-tab-wrapper.sml-tabs .nav-tab:focus {
	box-shadow: var(--sml-shadow-focus);
	outline: none;
}

.nav-tab-wrapper.sml-tabs .nav-tab:hover {
	background: var(--sml-gray-100);
	color: var(--sml-primary);
}

.nav-tab-wrapper.sml-tabs .nav-tab.nav-tab-active {
	background: var(--sml-gray-700);
	color: #fff;
	font-weight: 600;
}

.nav-tab-wrapper.sml-tabs .nav-tab.nav-tab-active:hover {
	background: var(--sml-gray-800);
	color: #fff;
}

@media (max-width: 782px) {
	h2.nav-tab-wrapper.sml-tabs {
		flex-direction: column;
		border-bottom: 0;
		border-left: 2px solid var(--sml-border);
		padding-bottom: 0;
		padding-left: 8px;
		margin-top: 16px;
	}

	h2.nav-tab-wrapper.sml-tabs .nav-tab {
		border-radius: 0 6px 6px 0;
		margin-left: -10px;
		padding-left: 16px;
	}

	h2.nav-tab-wrapper.sml-tabs .nav-tab.nav-tab-active {
		border-left: 2px solid var(--sml-gray-700);
		margin-left: -12px;
	}
}

/* ----------------------------------------------------------------
 * Toggle switch
 * ---------------------------------------------------------------- */
.sml-toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
}

.sml-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.sml-toggle .sml-toggle-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background-color: var(--sml-gray-200);
	border-radius: 9999px;
	transition: background-color var(--sml-transition), box-shadow var(--sml-transition);
}

.sml-toggle .sml-toggle-slider::before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: var(--sml-gray-800);
	border-radius: 50%;
	transition: transform var(--sml-transition), background-color var(--sml-transition);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.sml-toggle input:checked + .sml-toggle-slider {
	background-color: var(--sml-primary);
}

.sml-toggle input:checked + .sml-toggle-slider::before {
	background-color: #fff;
	transform: translateX(20px);
}

.sml-toggle input:focus + .sml-toggle-slider {
	box-shadow: var(--sml-shadow-focus);
}

.sml-toggle input:disabled + .sml-toggle-slider {
	opacity: 0.5;
	cursor: not-allowed;
}

.sml-toggle-row {
	display: flex;
	align-items: center;
	gap: 12px;
}

.sml-toggle-row .sml-toggle-label {
	font-size: 0.875rem;
	color: var(--sml-gray-700);
	cursor: pointer;
}

/* Toggle group (checkbox groups as toggle switches) */
.sml-toggle-group {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 0;
	border: 0;
}

.sml-toggle-group-item {
	display: flex;
	align-items: center;
	gap: 12px;
}

.sml-toggle-group-item .sml-toggle-label {
	font-size: 0.875rem;
	color: var(--sml-gray-700);
	cursor: pointer;
}

.sml-toggle-group-item .sml-toggle-label code {
	font-size: 11px;
	background: var(--sml-gray-100);
	padding: 1px 6px;
	border-radius: 3px;
	color: var(--sml-gray-500);
	margin-left: 4px;
}

/* ----------------------------------------------------------------
 * Button system
 * ---------------------------------------------------------------- */
.sml-button {
	display: inline-flex;
	gap: 8px;
	justify-content: center;
	align-items: center;
	background-color: var(--sml-brand);
	border: 1px solid var(--sml-brand-hover);
	color: #fff !important;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.875rem;
	text-transform: none;
	padding: 8px 16px;
	border-radius: var(--sml-radius);
	line-height: 1.25;
	text-decoration: none;
	transition: background-color var(--sml-transition), border-color var(--sml-transition),
		color var(--sml-transition), box-shadow var(--sml-transition), transform 100ms ease;
	box-shadow: var(--sml-shadow-sm);
}

.sml-button:hover {
	background-color: var(--sml-brand-hover);
	color: #fff !important;
	box-shadow: var(--sml-shadow-md);
	transform: translateY(-1px);
}

.sml-button:active {
	transform: translateY(0);
	box-shadow: var(--sml-shadow-sm);
}

.sml-button:focus {
	box-shadow: var(--sml-shadow-focus);
	color: #fff !important;
	outline: none;
}

.sml-button.secondary {
	background-color: transparent !important;
	border-color: var(--sml-primary) !important;
	color: var(--sml-primary) !important;
}

.sml-button.secondary:hover {
	background-color: var(--sml-primary) !important;
	color: #fff !important;
}

.sml-button.danger {
	background-color: var(--sml-error) !important;
	border-color: var(--sml-error) !important;
}

.sml-button.danger:hover {
	background-color: #991b1b !important;
	border-color: #991b1b !important;
}

.sml-button.small {
	padding: 4px 12px;
	font-size: 0.8125rem;
}

.sml-button .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 1;
	transition: none;
}

/* Legacy brand button compat */
.sml-btn-brand {
	background: var(--sml-brand) !important;
	border-color: var(--sml-brand) !important;
	color: #fff !important;
}

.sml-btn-brand:hover,
.sml-btn-brand:focus {
	background: var(--sml-brand-hover) !important;
	border-color: var(--sml-brand-hover) !important;
	color: #fff !important;
}

.sml-btn-brand:disabled,
.sml-btn-brand.disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.sml-btn-brand .spinner {
	margin: 0 4px 0 0;
}

/* ----------------------------------------------------------------
 * Form inputs inside cards
 * ---------------------------------------------------------------- */
.sml-card input[type="text"],
.sml-card input[type="url"],
.sml-card input[type="email"],
.sml-card input[type="number"],
.sml-card input[type="password"],
.sml-card textarea,
.sml-card select {
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius);
	padding: 8px 12px;
	font-size: 0.875rem;
	height: 38px;
	box-sizing: border-box;
	transition: border-color var(--sml-transition), box-shadow var(--sml-transition);
}

.sml-card textarea {
	height: auto;
}

.sml-card input[type="text"]:focus,
.sml-card input[type="url"]:focus,
.sml-card input[type="email"]:focus,
.sml-card input[type="number"]:focus,
.sml-card input[type="password"]:focus,
.sml-card textarea:focus,
.sml-card select:focus {
	border-color: var(--sml-primary);
	box-shadow: var(--sml-shadow-focus);
	outline: none;
}

.sml-card .description {
	color: var(--sml-gray-500);
	font-size: 0.8125rem;
	margin-top: 4px;
	font-style: italic;
}

.sml-card label {
	font-weight: 500;
	color: var(--sml-gray-800);
}

/* Section headings inside cards (from WP Settings API) — matches .sml-card-header look */
.sml-card .sml-card-body h2 {
	background: var(--sml-gray-50);
	margin: -20px -20px 20px;
	padding: 14px 20px;
	border-bottom: 2px solid var(--sml-border);
	border-radius: var(--sml-radius-lg) var(--sml-radius-lg) 0 0;
	font-size: 1rem;
	font-weight: 600;
	color: var(--sml-gray-800);
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.sml-card .sml-card-body .form-table + h2 {
	margin-top: 20px;
}

/* Form table refinements inside cards */
.sml-card .form-table th {
	font-weight: 600;
	font-size: 0.875rem;
	color: var(--sml-gray-700);
	padding: 16px 12px 16px 0;
	vertical-align: top;
	width: 220px;
}

.sml-card .form-table td {
	padding: 12px 0;
}

.sml-card .form-table td .description {
	margin-top: 6px;
}

/* Fieldset layout for single checkbox toggles (matches SEO) */
.sml-card .form-table fieldset:not(.sml-toggle-group) {
	display: flex;
	gap: 12px;
	align-items: center;
}

/* Override toggle label font-weight inside cards */
.sml-card .sml-toggle {
	font-weight: normal;
}

/* Disabled inputs */
.sml-card input:disabled,
.sml-card select:disabled {
	background: var(--sml-gray-50);
	color: var(--sml-gray-500);
	cursor: not-allowed;
}

/* Select dropdown sizing */
.sml-card select {
	min-height: 38px;
}

/* Number input sizing */
.sml-card input.small-text {
	width: 70px;
}

/* Select2 overrides */
.select2-container .select2-selection--single {
	height: 38px;
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius);
	background: #fff;
}

.select2-container .select2-selection--single .select2-selection__rendered {
	line-height: 38px;
	color: var(--sml-gray-800);
	padding-left: 12px;
}

.select2-container .select2-selection--single .select2-selection__arrow {
	height: 38px;
}

.select2-container--open .select2-selection--single,
.select2-container--focus .select2-selection--single {
	border-color: var(--sml-primary) !important;
	box-shadow: var(--sml-shadow-focus);
}

/* Password field wrapper */
.sml-password-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-start;
	align-items: center;
}

.sml-password-wrapper input[type="password"] {
	min-width: 200px;
}

/* Purge / disable license button */
.sml-button.purge {
	background-color: transparent;
	border: 1px solid var(--sml-primary);
	color: var(--sml-primary) !important;
	padding: 8px 16px;
	border-radius: var(--sml-radius);
	font-weight: 600;
	font-size: 0.875rem;
	line-height: 1.25;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--sml-transition), color var(--sml-transition);
	box-shadow: none;
}

.sml-button.purge:hover {
	background-color: var(--sml-primary);
	color: #fff !important;
	transform: none;
}

/* Submit button after card — adjacent sibling, matches signocore-seo .postbox + .submit pattern */
.sml-card + .submit #submit {
	background: var(--sml-brand);
	border-color: var(--sml-brand-hover);
	color: #fff;
	font-weight: 600;
	text-transform: none;
	padding: 8px 32px;
	margin-left: 7px;
	border-radius: var(--sml-radius);
	box-shadow: var(--sml-shadow-sm);
	font-size: 0.875rem;
	line-height: 1.5;
	transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out,
		box-shadow 0.2s ease-in-out, transform 0.1s ease-in-out;
}

.sml-card + .submit #submit:hover {
	background: var(--sml-brand-hover);
	border-color: var(--sml-brand-hover);
	color: #fff;
	box-shadow: var(--sml-shadow-md);
	transform: translateY(-1px);
}

.sml-card + .submit #submit:active {
	transform: translateY(0);
}

.sml-card + .submit #submit:focus {
	box-shadow: var(--sml-shadow-focus);
	outline: none;
}

/* ----------------------------------------------------------------
 * Pro badge
 * ---------------------------------------------------------------- */
.sml-pro-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--sml-brand);
	background: var(--sml-brand-light);
	padding: 2px 8px;
	border-radius: 9999px;
	vertical-align: middle;
	line-height: 1.4;
}

.sml-pro-badge .dashicons {
	font-size: 12px;
	width: 12px;
	height: 12px;
	line-height: 12px;
}

.sml-pro-feature {
	position: relative;
	opacity: 0.6;
	pointer-events: none;
}

.sml-pro-feature::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.4);
	border-radius: var(--sml-radius);
}

.sml-pro-overlay {
	position: relative;
}

.sml-pro-overlay .sml-pro-cta {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.9);
	border-radius: var(--sml-radius);
	z-index: 1;
	pointer-events: auto;
}

.sml-pro-overlay .sml-pro-cta .dashicons-lock {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: var(--sml-brand);
}

.sml-pro-overlay .sml-pro-cta a {
	color: #fff;
	background: var(--sml-brand);
	padding: 6px 16px;
	border-radius: var(--sml-radius);
	text-decoration: none;
	font-weight: 600;
	font-size: 13px;
}

.sml-pro-overlay .sml-pro-cta a:hover {
	background: var(--sml-brand-hover);
}

/* ----------------------------------------------------------------
 * Dashboard - stat cards grid
 * ---------------------------------------------------------------- */
.sml-dashboard-stats {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.sml-stat-card {
	background: #fff;
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius-lg);
	padding: 20px;
	box-shadow: var(--sml-shadow-sm);
	transition: box-shadow var(--sml-transition);
}

.sml-stat-card:hover {
	box-shadow: var(--sml-shadow-md);
}

.sml-stat-card .sml-stat-value {
	font-size: 28px;
	font-weight: 600;
	line-height: 1;
	color: var(--sml-gray-800);
	margin-bottom: 4px;
}

.sml-stat-card .sml-stat-label {
	font-size: 13px;
	color: var(--sml-gray-500);
}

.sml-stat-card.sml-stat-brand .sml-stat-value {
	color: var(--sml-brand);
}

/* ----------------------------------------------------------------
 * Dashboard - language list
 * ---------------------------------------------------------------- */
.sml-dashboard-languages {
	background: #fff;
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius);
	padding: 0;
}

.sml-dashboard-languages .sml-section-title {
	padding: 14px 16px;
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	border-bottom: 1px solid #f0f0f1;
}

.sml-dashboard-languages ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sml-dashboard-languages li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	border-bottom: 1px solid #f0f0f1;
}

.sml-dashboard-languages li:last-child {
	border-bottom: none;
}

.sml-dashboard-languages .sml-lang-info {
	flex: 1;
	min-width: 0;
}

.sml-dashboard-languages .sml-lang-name {
	font-weight: 500;
}

.sml-dashboard-languages .sml-lang-stats {
	font-size: 12px;
	color: var(--sml-gray);
}

/* ----------------------------------------------------------------
 * Dashboard - progress bar
 * ---------------------------------------------------------------- */
.sml-progress-bar {
	background: var(--sml-gray-200);
	border-radius: 3px;
	height: 16px;
	width: 100%;
	position: relative;
	overflow: hidden;
}

.sml-progress-bar-fill {
	background: var(--sml-brand);
	border-radius: 3px;
	height: 100%;
	transition: width 0.3s ease;
}

/* ----------------------------------------------------------------
 * Flag images
 * ---------------------------------------------------------------- */
.sml-flag {
	display: inline-block;
	vertical-align: middle;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.column-sml_flag {
	width: 50px;
}

.column-sml_flag .sml-flag {
	width: 24px;
	height: 18px;
}

/* ----------------------------------------------------------------
 * Translation status badges
 * ---------------------------------------------------------------- */
.sml-status {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 10px;
	line-height: 1.4;
	white-space: nowrap;
}

.sml-status--published {
	color: var(--sml-green);
	background: var(--sml-green-bg);
}

.sml-status--draft {
	color: var(--sml-gray);
	background: var(--sml-gray-bg);
}

.sml-status--needs_update {
	color: var(--sml-orange);
	background: var(--sml-orange-bg);
}

.sml-status--in_progress {
	color: var(--sml-blue);
	background: var(--sml-blue-bg);
}

/* ----------------------------------------------------------------
 * Languages admin page - language table
 * ---------------------------------------------------------------- */
.sml-languages-table {
	border-collapse: collapse;
	width: 100%;
	background: #fff;
	border: none;
}

.sml-languages-table th {
	text-align: left;
	padding: 10px 12px;
	font-weight: 600;
	font-size: 0.8125rem;
	color: var(--sml-gray-600);
	background: transparent;
	border-bottom: 2px solid var(--sml-border);
}

.sml-languages-table td {
	padding: 12px;
	border-bottom: 1px solid var(--sml-gray-100);
	vertical-align: middle;
}

.sml-languages-table tr:last-child td {
	border-bottom: none;
}

.sml-languages-table .sml-lang-name {
	display: flex;
	align-items: center;
	gap: 8px;
}

.sml-languages-table .sml-lang-native {
	color: var(--sml-gray-500);
	font-size: 12px;
}

.sml-languages-table .sml-lang-code {
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
	background: var(--sml-gray-100);
	padding: 2px 6px;
	border-radius: 3px;
	color: var(--sml-gray-600);
}

.sml-languages-table .sml-default-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	color: var(--sml-brand);
	background: var(--sml-brand-light);
	padding: 2px 8px;
	border-radius: 9999px;
}

.sml-languages-table .sml-row-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

.sml-languages-table .sml-row-actions a {
	color: var(--sml-primary);
	text-decoration: none;
	font-size: 13px;
}

.sml-languages-table .sml-row-actions a:hover {
	color: var(--sml-brand);
}

.sml-languages-table .sml-row-actions .sml-remove-link {
	color: var(--sml-red);
}

.sml-languages-table .sml-row-actions .sml-remove-link:hover {
	color: #a02020;
}

/* ----------------------------------------------------------------
 * Language picker (admin Languages page)
 * ---------------------------------------------------------------- */
.sml-lang-picker-search {
	position: relative;
	margin-bottom: 16px;
}

.sml-lang-picker-search .dashicons {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--sml-gray-400);
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.sml-lang-picker-search input[type="text"] {
	width: 100%;
	padding: 10px 12px 10px 38px;
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius);
	font-size: 14px;
	outline: none;
	transition: border-color var(--sml-transition), box-shadow var(--sml-transition);
}

.sml-lang-picker-search input:focus {
	border-color: var(--sml-brand);
	box-shadow: 0 0 0 1px var(--sml-brand);
}

.sml-lang-picker-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 8px;
	max-height: 400px;
	overflow-y: auto;
	padding: 4px;
}

.sml-lang-picker-grid::-webkit-scrollbar {
	width: 6px;
}

.sml-lang-picker-grid::-webkit-scrollbar-track {
	background: var(--sml-gray-100);
	border-radius: 3px;
}

.sml-lang-picker-grid::-webkit-scrollbar-thumb {
	background: var(--sml-gray-300);
	border-radius: 3px;
}

.sml-lang-picker-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border: 1px solid var(--sml-border);
	border-radius: 6px;
	cursor: pointer;
	transition: all var(--sml-transition);
	user-select: none;
	text-decoration: none;
	color: inherit;
}

.sml-lang-picker-item:hover {
	border-color: var(--sml-brand);
	background: var(--sml-brand-light);
	color: inherit;
	text-decoration: none;
}

.sml-lang-picker-item:focus {
	outline: none;
	box-shadow: var(--sml-shadow-focus);
	border-color: var(--sml-brand);
}

.sml-lang-picker-item.hidden {
	display: none;
}

.sml-lang-picker-item .sml-flag {
	flex-shrink: 0;
}

.sml-lang-picker-item-info {
	flex: 1;
	min-width: 0;
}

.sml-lang-picker-item-name {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--sml-gray-800);
	line-height: 1.3;
}

.sml-lang-picker-item-native {
	display: block;
	font-size: 11px;
	color: var(--sml-gray-500);
	line-height: 1.3;
}

.sml-lang-picker-item-code {
	flex-shrink: 0;
	font-family: Consolas, Monaco, monospace;
	font-size: 11px;
	color: var(--sml-gray-400);
	background: var(--sml-gray-100);
	padding: 1px 6px;
	border-radius: 3px;
}

.sml-lang-picker-no-results {
	grid-column: 1 / -1;
	text-align: center;
	padding: 32px;
	color: var(--sml-gray-500);
	display: none;
}

.sml-lang-picker-count {
	font-size: 13px;
	color: var(--sml-gray-500);
	margin-bottom: 12px;
}

/* ----------------------------------------------------------------
 * Settings page tabs (legacy)
 * ---------------------------------------------------------------- */
.sml-settings-tabs {
	display: flex;
	gap: 0;
	border-bottom: 1px solid var(--sml-border);
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}

.sml-settings-tabs .sml-tab {
	display: block;
	padding: 10px 16px;
	text-decoration: none;
	color: var(--sml-gray);
	font-weight: 500;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	cursor: pointer;
	transition: color 0.15s, border-color 0.15s;
}

.sml-settings-tabs .sml-tab:hover {
	color: #1d2327;
}

.sml-settings-tabs .sml-tab.active {
	color: var(--sml-brand);
	border-bottom-color: var(--sml-brand);
}

.sml-settings-panel {
	display: none;
}

.sml-settings-panel.active {
	display: block;
}

/* ----------------------------------------------------------------
 * URL strategy radio cards
 * ---------------------------------------------------------------- */
.sml-strategy-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.sml-strategy-option {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border: 2px solid var(--sml-border);
	border-radius: var(--sml-radius-lg);
	cursor: pointer;
	transition: all var(--sml-transition);
}

.sml-strategy-option:hover {
	border-color: var(--sml-brand);
	background: var(--sml-brand-light);
}

.sml-strategy-option.selected {
	border-color: var(--sml-brand);
	background: var(--sml-brand-light);
}

.sml-strategy-option.disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.sml-strategy-option.disabled:hover {
	border-color: var(--sml-border);
	background: transparent;
}

.sml-strategy-option input[type="radio"] {
	margin-top: 2px;
	accent-color: var(--sml-brand);
}

.sml-strategy-option-content {
	flex: 1;
}

.sml-strategy-option-title {
	font-weight: 600;
	color: var(--sml-gray-800);
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 2px;
}

.sml-strategy-option-desc {
	font-size: 13px;
	color: var(--sml-gray-500);
}

.sml-strategy-option-example {
	font-size: 12px;
	font-family: Consolas, Monaco, monospace;
	color: var(--sml-gray-600);
	background: var(--sml-gray-100);
	padding: 4px 8px;
	border-radius: var(--sml-radius);
	margin-top: 6px;
	display: inline-block;
}

/* ----------------------------------------------------------------
 * Domain Mapping
 * ---------------------------------------------------------------- */
#sml-domain-mapping-config {
	display: none;
}

.sml-domain-mapping-list {
	margin-top: 12px;
}

.sml-domain-mapping-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid var(--sml-gray-200, #f0f0f1);
}

.sml-domain-mapping-row:last-child {
	border-bottom: none;
}

.sml-domain-mapping-lang {
	min-width: 120px;
	font-weight: 500;
	font-size: 13px;
	color: var(--sml-gray-800, #1e1e1e);
}

.sml-domain-mapping-row input.regular-text {
	flex: 1;
	max-width: 300px;
}

.sml-domain-mapping-badge {
	font-size: 11px;
	font-weight: 600;
	color: var(--sml-gray-500, #787c82);
	background: var(--sml-gray-100, #f6f7f7);
	padding: 2px 8px;
	border-radius: var(--sml-radius, 4px);
}

.sml-domain-input.sml-input-error {
	border-color: #d63638;
	box-shadow: 0 0 0 1px #d63638;
}

.sml-domain-error {
	font-size: 12px;
	color: #d63638;
	flex-basis: 100%;
	margin-top: -4px;
}

.sml-domain-mapping-row {
	flex-wrap: wrap;
}

/* ----------------------------------------------------------------
 * Switcher Usage Guide
 * ---------------------------------------------------------------- */
.sml-guide-methods {
	display: grid;
	gap: 16px;
	margin-top: 12px;
}

.sml-guide-method {
	padding: 16px;
	background: var(--sml-gray-50, #f8fafc);
	border: 1px solid var(--sml-gray-200, #e2e8f0);
	border-radius: var(--sml-radius, 4px);
}

.sml-guide-method-header {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 8px;
}

.sml-guide-method-header .dashicons {
	color: var(--sml-gray-500, #64748b);
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.sml-guide-method p {
	margin: 0 0 8px;
	font-size: 13px;
	color: var(--sml-gray-600, #475569);
}

.sml-guide-method p:last-child {
	margin-bottom: 0;
}

code.sml-guide-code {
	display: block;
	padding: 10px 14px;
	background: var(--sml-gray-800, #1e293b);
	color: #e2e8f0;
	border-radius: var(--sml-radius, 4px);
	font-size: 13px;
	line-height: 1.5;
	overflow-x: auto;
	white-space: nowrap;
}

.sml-guide-details {
	margin-top: 10px;
}

.sml-guide-details summary {
	cursor: pointer;
	font-size: 12px;
	color: var(--sml-gray-500, #64748b);
	user-select: none;
}

.sml-guide-details summary:hover {
	color: var(--sml-gray-700, #334155);
}

.sml-guide-attributes {
	margin: 8px 0;
	font-size: 12px;
	border-collapse: collapse;
}

.sml-guide-attributes td {
	padding: 3px 12px 3px 0;
	color: var(--sml-gray-600, #475569);
}

.sml-guide-attributes code {
	background: var(--sml-gray-200, #e2e8f0);
	padding: 1px 6px;
	border-radius: 3px;
	font-size: 12px;
}

/* ----------------------------------------------------------------
 * Guide page
 * ---------------------------------------------------------------- */
.sml-guide-section .sml-card {
	margin-bottom: 16px;
}

.sml-guide-section .sml-card:last-child {
	margin-bottom: 0;
}

.sml-guide-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.sml-guide-table th,
.sml-guide-table td {
	text-align: left;
	padding: 10px 14px;
	border-bottom: 1px solid var(--sml-gray-200, #e2e8f0);
	font-size: 13px;
	vertical-align: top;
}

.sml-guide-table th {
	background: var(--sml-gray-50, #f8fafc);
	font-weight: 600;
	color: var(--sml-gray-700, #334155);
}

.sml-guide-table code {
	background: var(--sml-gray-100, #f1f5f9);
	padding: 2px 6px;
	border-radius: var(--sml-radius, 4px);
	font-size: 12px;
	color: var(--sml-gray-800, #1e293b);
}

.sml-guide-section code.sml-guide-code {
	margin: 12px 0 0;
	white-space: pre;
}

.sml-guide-section code.sml-guide-code:first-child {
	margin-top: 0;
}

.sml-guide-section code.sml-guide-code pre {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: inherit;
	white-space: pre;
}

.sml-guide-section .sml-card-body p {
	font-size: 13px;
	line-height: 1.6;
	color: var(--sml-gray-600, #475569);
}

.sml-guide-section .sml-card-body p:last-child {
	margin-bottom: 0;
}

.sml-guide-section .sml-card-body ul,
.sml-guide-section .sml-card-body ol {
	font-size: 13px;
	line-height: 1.8;
	color: var(--sml-gray-600, #475569);
}

.sml-guide-section .sml-card-body h4 {
	font-size: 13px;
	font-weight: 600;
	color: var(--sml-gray-800, #1e293b);
	margin: 20px 0 8px;
}

.sml-guide-section .sml-card-body h4:first-child {
	margin-top: 0;
}

.sml-guide-features {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
	margin-top: 12px;
}

/* ----------------------------------------------------------------
 * Wizard
 * ---------------------------------------------------------------- */
.sml-wizard {
	max-width: 680px;
	margin: 40px auto;
	background: #fff;
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius-lg);
	overflow: hidden;
}

.sml-wizard-header {
	padding: 24px 32px 20px;
	border-bottom: 1px solid #f0f0f1;
}

.sml-wizard-header h2 {
	margin: 0 0 4px;
	font-size: 20px;
}

.sml-wizard-header p {
	margin: 0;
	color: var(--sml-gray);
}

.sml-wizard-steps {
	display: flex;
	gap: 0;
	padding: 0 32px;
	margin: 0;
	list-style: none;
	border-bottom: 1px solid #f0f0f1;
}

.sml-wizard-steps li {
	padding: 12px 16px;
	font-size: 13px;
	color: var(--sml-gray);
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.sml-wizard-steps li.active {
	color: var(--sml-brand);
	border-bottom-color: var(--sml-brand);
	font-weight: 600;
}

.sml-wizard-steps li.completed {
	color: var(--sml-green);
}

.sml-wizard-body {
	padding: 24px 32px;
}

.sml-wizard-step {
	display: none;
}

.sml-wizard-step.active {
	display: block;
}

.sml-wizard-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 32px;
	border-top: 1px solid #f0f0f1;
	background: var(--sml-gray-bg);
}

.sml-wizard-footer .sml-skip-link {
	color: var(--sml-gray);
	text-decoration: none;
	font-size: 13px;
}

.sml-wizard-footer .sml-skip-link:hover {
	color: #1d2327;
}

.sml-wizard-footer .sml-wizard-actions {
	display: flex;
	gap: 8px;
}

/* ----------------------------------------------------------------
 * Wizard - language picker (step 1)
 * ---------------------------------------------------------------- */
.sml-language-search {
	width: 100%;
	margin-bottom: 16px;
}

.sml-language-search input {
	width: 100%;
	padding: 8px 12px;
}

.sml-language-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 8px;
	max-height: 360px;
	overflow-y: auto;
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius);
	padding: 12px;
}

.sml-language-grid label {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	border-radius: var(--sml-radius);
	cursor: pointer;
	transition: background 0.15s;
}

.sml-language-grid label:hover {
	background: var(--sml-gray-bg);
}

.sml-language-grid label.checked {
	background: var(--sml-brand-light);
}

.sml-language-grid .sml-flag {
	flex-shrink: 0;
}

.sml-language-grid .sml-no-results {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--sml-gray);
	padding: 20px;
}

/* ----------------------------------------------------------------
 * Wizard - default language radio
 * ---------------------------------------------------------------- */
.sml-default-language-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sml-default-language-list li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f1;
}

.sml-default-language-list li:last-child {
	border-bottom: none;
}

/* ----------------------------------------------------------------
 * Loading state
 * ---------------------------------------------------------------- */
.sml-loading .spinner {
	visibility: visible;
	float: none;
}

/* ----------------------------------------------------------------
 * Utility
 * ---------------------------------------------------------------- */
.sml-text-muted {
	color: var(--sml-gray);
}

.sml-mt-0 {
	margin-top: 0;
}

.sml-mb-0 {
	margin-bottom: 0;
}

/* ----------------------------------------------------------------
 * String Translation – Scan Bar
 * ---------------------------------------------------------------- */
.sml-scan-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 14px;
	background: var(--sml-gray-50);
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius);
	margin-bottom: 16px;
	font-size: 13px;
}

.sml-scan-bar-info {
	display: flex;
	align-items: center;
	gap: 8px;
}

.sml-scan-sources {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.sml-scan-source-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 10px;
	background: #fff;
	border: 1px solid var(--sml-border);
	border-radius: 12px;
	font-size: 12px;
	color: var(--sml-gray-700);
}

.sml-scan-source-pill strong {
	color: var(--sml-gray-900);
}

.sml-scan-bar-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.sml-scan-timestamp {
	color: var(--sml-gray-500);
	font-size: 12px;
	white-space: nowrap;
}

/* ----------------------------------------------------------------
 * Translation metabox (post editor sidebar)
 * ---------------------------------------------------------------- */
.sml-metabox {
	max-width: 100%;
}

.sml-metabox__current {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--sml-border);
}

.sml-metabox__label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
}

.sml-metabox__lang-display {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 8px;
}

.sml-metabox__select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.sml-metabox__heading {
	display: block;
	margin-bottom: 8px;
}

.sml-metabox__copy {
	margin-bottom: 12px;
	padding: 8px 10px;
	background: var(--sml-blue-bg);
	border: 1px solid var(--sml-blue);
	border-radius: var(--sml-radius);
}

.sml-metabox__copy-btn {
	width: 100%;
	text-align: center;
	cursor: pointer;
}

.sml-metabox__copy-note {
	font-size: 11px;
	color: var(--sml-gray-500);
	margin: 4px 0 0;
}

.sml-metabox__table {
	width: 100%;
	border: 0;
	border-collapse: collapse;
}

.sml-metabox__row {
	border-bottom: 1px solid #f0f0f0;
}

.sml-metabox__row:last-child {
	border-bottom: none;
}

.sml-metabox__row td {
	padding: 0 4px 6px !important;
	word-break: break-word;
}

.sml-metabox__flag {
	width: 24px;
}

.sml-metabox__info {
	max-width: 100%;
	overflow: hidden;
}

.sml-metabox__status {
	font-size: 11px;
	color: var(--sml-gray-500);
}

.sml-metabox__status--published {
	color: var(--sml-green);
}

.sml-metabox__status--draft {
	color: var(--sml-orange);
}

.sml-metabox__actions {
	text-align: right;
	white-space: nowrap;
}

.sml-metabox__actions .button {
	margin-left: 2px;
	padding: 0 6px;
}

.sml-metabox__link-row td {
	padding: 4px;
}

.sml-metabox__search-input {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font-size: 12px;
}

.sml-metabox__search-results {
	max-height: 150px;
	overflow-y: auto;
	margin-top: 4px;
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius);
}

.sml-metabox__search-result {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 5px 8px;
	cursor: pointer;
	border-bottom: 1px solid #f0f0f0;
	font-size: 12px;
}

.sml-metabox__search-result:last-child {
	border-bottom: 0;
}

.sml-metabox__search-result:hover {
	background: var(--sml-gray-50);
}

.sml-metabox__search-result-title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 160px;
}

.sml-metabox__search-result-status {
	color: var(--sml-gray-500);
	font-size: 11px;
	flex-shrink: 0;
}

.sml-metabox__search-empty {
	padding: 6px 8px;
	color: var(--sml-gray-500);
	font-size: 12px;
}

.sml-metabox .sml-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* ----------------------------------------------------------------
 * Language pill tabs
 * ---------------------------------------------------------------- */
.sml-lang-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 16px;
}

.sml-lang-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 9999px;
	cursor: pointer;
	border: 1px solid var(--sml-border);
	background: #fff;
	font-size: 13px;
	font-weight: 500;
	color: var(--sml-gray-600);
	transition: color var(--sml-transition), background-color var(--sml-transition), border-color var(--sml-transition);
	text-decoration: none;
}

.sml-lang-pill:hover {
	background: var(--sml-gray-100);
	color: var(--sml-gray-800);
	text-decoration: none;
}

.sml-lang-pill:focus {
	box-shadow: var(--sml-shadow-focus);
	outline: none;
	text-decoration: none;
}

.sml-lang-pill.active {
	background: var(--sml-gray-700);
	color: #fff;
	border-color: var(--sml-gray-700);
}

.sml-lang-pill.active:hover {
	background: var(--sml-gray-800);
	border-color: var(--sml-gray-800);
	color: #fff;
}

.sml-lang-pill img {
	border-radius: 2px;
}

/* Language panels */
.sml-lang-panel {
	display: none;
}

.sml-lang-panel.active {
	display: block;
}

/* Field rows inside panel */
.sml-field-row {
	margin-bottom: 16px;
}

.sml-field-row:last-child {
	margin-bottom: 0;
}

.sml-field-row label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 4px;
	color: var(--sml-gray-700);
}

.sml-field-row input[type="text"] {
	width: 100%;
	max-width: 500px;
}

/* ----------------------------------------------------------------
 * Taxonomy settings box (replicates .postbox.wpsseo from signocore-seo)
 * ---------------------------------------------------------------- */

/* Base container — matches .postbox.wpsseo */
.postbox.sml-settings {
	margin-top: 32px;
	background: #fff;
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius-lg);
	box-shadow: var(--sml-shadow-sm);
	transition: box-shadow var(--sml-transition), transform var(--sml-transition);
}

.postbox.sml-settings:first-of-type {
	margin-top: 24px;
}

.postbox.sml-settings:hover {
	box-shadow: var(--sml-shadow-md);
}

/* Header — matches .postbox.wpsseo .inside h2 */
.postbox.sml-settings .inside h2 {
	background: var(--sml-gray-50);
	color: var(--sml-gray-800);
	border-bottom: 2px solid var(--sml-border);
	margin: -11px -12px 24px;
	padding: 16px;
	border-radius: var(--sml-radius-lg) var(--sml-radius-lg) 0 0;
	line-height: 1.25;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

/* Inside — uses WP core default padding (0 12px 12px) */

/* WP metabox header (generated by add_meta_box) */
.postbox.sml-settings > .postbox-header {
	background: var(--sml-gray-50);
	border-bottom: 2px solid var(--sml-border);
}

.postbox.sml-settings > .postbox-header h2 {
	color: var(--sml-gray-800);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

/* Form inputs — matches .postbox.wpsseo input/select/textarea */
.postbox.sml-settings input[type="text"],
.postbox.sml-settings input[type="url"],
.postbox.sml-settings input[type="email"],
.postbox.sml-settings input[type="number"],
.postbox.sml-settings input[type="password"],
.postbox.sml-settings textarea,
.postbox.sml-settings select {
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius);
	padding: 8px 12px;
	font-size: 0.875rem;
	transition: border-color var(--sml-transition), box-shadow var(--sml-transition);
}

.postbox.sml-settings input[type="text"]:focus,
.postbox.sml-settings input[type="url"]:focus,
.postbox.sml-settings input[type="email"]:focus,
.postbox.sml-settings input[type="number"]:focus,
.postbox.sml-settings input[type="password"]:focus,
.postbox.sml-settings textarea:focus,
.postbox.sml-settings select:focus {
	border-color: var(--sml-primary);
	box-shadow: var(--sml-shadow-focus);
	outline: none;
}

.postbox.sml-settings input[type="text"]:disabled,
.postbox.sml-settings input[type="url"]:disabled,
.postbox.sml-settings input[type="email"]:disabled,
.postbox.sml-settings input[type="number"]:disabled,
.postbox.sml-settings input[type="password"]:disabled,
.postbox.sml-settings textarea:disabled,
.postbox.sml-settings select:disabled {
	background: var(--sml-gray-50);
	color: var(--sml-gray-500);
	cursor: not-allowed;
}

/* Label styling — matches .postbox.wpsseo label */
.postbox.sml-settings label {
	font-weight: 500;
	color: var(--sml-gray-800);
}

/* Description text — matches .postbox.wpsseo .description */
.postbox.sml-settings .description {
	color: var(--sml-gray-500);
	font-size: 0.8125rem;
	margin-top: 4px;
	font-style: italic;
}

.postbox.sml-settings .description a {
	color: var(--sml-primary);
}

/* Form table inside settings box */
.postbox.sml-settings .sml-settings-table {
	margin: 0;
	width: 100%;
}

/* Sidebar metabox sections */
.postbox.sml-settings .sml-metabox__section {
	margin-bottom: 12px;
}

.postbox.sml-settings .sml-metabox__section:last-child {
	margin-bottom: 0;
}

.postbox.sml-settings .sml-metabox__info {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.postbox.sml-settings .sml-metabox__info strong {
	font-size: 12px;
}

.postbox.sml-settings .sml-metabox__status {
	display: block;
}

.postbox.sml-settings .sml-metabox__actions .button {
	padding: 0 6px;
	font-size: 11px;
}

/* Submit button after postbox — matches .postbox.wpsseo + .submit #submit */
.postbox.sml-settings + .submit #submit {
	background: var(--sml-brand);
	border-color: var(--sml-brand-hover);
	color: #fff;
	font-weight: 600;
	text-transform: none;
	padding: 8px 32px;
	margin-left: 7px;
	border-radius: var(--sml-radius);
	box-shadow: var(--sml-shadow-sm);
	font-size: 0.875rem;
	line-height: 1.5;
	transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out,
		box-shadow 0.2s ease-in-out, transform 0.1s ease-in-out;
}

.postbox.sml-settings + .submit #submit:hover {
	background: var(--sml-brand-hover);
	border-color: var(--sml-brand-hover);
	color: #fff;
	box-shadow: var(--sml-shadow-md);
	transform: translateY(-1px);
}

.postbox.sml-settings + .submit #submit:active {
	transform: translateY(0);
	box-shadow: var(--sml-shadow-sm);
}

.postbox.sml-settings + .submit #submit:focus {
	box-shadow: var(--sml-shadow-focus);
	outline: none;
}

/* Responsive — matches .postbox.wpsseo mobile form-table */
@media (max-width: 782px) {
	.postbox.sml-settings .inside .sml-settings-table th {
		padding-right: 0;
		padding-bottom: 0.5rem;
	}

	.postbox.sml-settings .inside .sml-settings-table td {
		padding: 0 0 12px;
	}
}

/* ----------------------------------------------------------------
 * Permalink Translation – Slug inputs
 * ---------------------------------------------------------------- */
.sml-permalink-slugs {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.sml-permalink-slug-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 12px;
	background: var(--sml-gray-50);
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius);
}

.sml-permalink-slug-label {
	width: 180px;
	flex-shrink: 0;
	font-size: 13px;
	font-weight: 500;
	color: var(--sml-gray-700);
}

.sml-permalink-slug-hint {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--sml-gray-500);
}

.sml-permalink-slug-hint code {
	font-size: 11px;
	padding: 1px 5px;
	background: var(--sml-gray-100, #f0f0f0);
	border-radius: 3px;
}

.sml-permalink-slug-fields {
	flex: 1;
}

.sml-permalink-slug-input {
	max-width: 240px !important;
}

.sml-permalink-slug-input:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

@media (max-width: 782px) {
	.sml-permalink-slug-row {
		flex-direction: column;
		align-items: flex-start;
	}

	.sml-permalink-slug-label {
		width: 100%;
	}

	.sml-permalink-slug-fields {
		width: 100%;
	}
}

/* ----------------------------------------------------------------
 * String Translation – Toolbar & Progress
 * ---------------------------------------------------------------- */
.sml-string-toolbar-wrap {
	position: sticky;
	top: 32px;
	z-index: 2;
	background: #f0f0f1;
	padding-bottom: 8px;
	margin-bottom: 8px;
}

.sml-string-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	padding: 10px 14px;
	background: #fff;
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius-lg);
	box-shadow: var(--sml-shadow-sm);
}

.sml-string-toolbar-main {
	flex: 1;
	min-width: 0;
}

.sml-string-toolbar-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.sml-string-lang-pills {
	margin-bottom: 8px;
}

.sml-filter-bar {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.sml-filter-bar select,
.sml-filter-bar input[type="search"] {
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius);
	padding: 6px 10px;
	font-size: 13px;
	height: 36px;
	box-sizing: border-box;
}

.sml-filter-bar input[type="search"] {
	min-width: 250px;
}

.sml-string-progress {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-top: 6px;
	padding: 8px 14px;
	background: #fff;
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius-lg);
	box-shadow: var(--sml-shadow-sm);
}

.sml-string-status-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.sml-status-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid var(--sml-border);
	background: var(--sml-gray-50);
	color: var(--sml-gray-700);
	border-radius: 999px;
	padding: 6px 10px;
	font-size: 12px;
	cursor: pointer;
	transition: border-color var(--sml-transition), background-color var(--sml-transition), color var(--sml-transition);
}

.sml-status-chip:hover {
	background: #fff;
	border-color: var(--sml-gray-300);
}

.sml-status-chip:focus {
	outline: none;
	box-shadow: var(--sml-shadow-focus);
}

.sml-status-chip.active {
	background: var(--sml-gray-700);
	border-color: var(--sml-gray-700);
	color: #fff;
}

.sml-status-chip-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	font-size: 11px;
	font-weight: 700;
	border-radius: 999px;
	padding: 0 4px;
	background: rgba(15, 23, 42, 0.08);
}

.sml-status-chip.active .sml-status-chip-count {
	background: rgba(255, 255, 255, 0.2);
}

.sml-string-progress-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 12px;
	color: var(--sml-gray-600);
}

.sml-unsaved-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--sml-gray-100);
	color: var(--sml-gray-700);
	font-weight: 500;
}

.sml-unsaved-badge.has-unsaved {
	background: var(--sml-orange-bg);
	color: var(--sml-warning);
}

.sml-last-saved {
	color: var(--sml-gray-500);
}


.sml-string-feedback {
	min-height: 18px;
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 500;
}

.sml-string-feedback.is-info {
	color: var(--sml-blue);
}

.sml-string-feedback.is-warning {
	color: var(--sml-warning);
}

.sml-string-feedback.is-error {
	color: var(--sml-error);
}

/* ----------------------------------------------------------------
 * String Translation – Card List
 * ---------------------------------------------------------------- */
.sml-string-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: 960px;
}

.sml-string-list.is-loading {
	pointer-events: none;
}

.sml-string-card {
	background: #fff;
	border: 1px solid var(--sml-border);
	border-left: 3px solid var(--sml-gray-300);
	border-radius: var(--sml-radius-lg);
	padding: 12px 16px;
	box-shadow: var(--sml-shadow-sm);
	transition: box-shadow var(--sml-transition), border-color var(--sml-transition);
}

.sml-string-card[data-status="translated"] {
	border-left-color: var(--sml-green);
}

.sml-string-card[data-status="needs_translation"] {
	border-left-color: var(--sml-red);
}

.sml-string-card[data-status="needs_update"] {
	border-left-color: var(--sml-orange);
}

.sml-string-card:hover {
	box-shadow: var(--sml-shadow-md);
}

.sml-string-card.is-dirty {
	border-left-color: var(--sml-orange);
}

.sml-string-card.is-skeleton {
	border-left-color: var(--sml-gray-200);
}

.sml-string-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
}

.sml-string-original {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--sml-gray-800);
	line-height: 1.4;
	word-break: break-word;
	min-width: 0;
}

.sml-string-context {
	display: inline-block;
	font-size: 10px;
	font-weight: 600;
	color: var(--sml-gray-500);
	background: var(--sml-gray-100);
	padding: 2px 8px;
	border-radius: 9999px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	flex-shrink: 0;
}

.sml-string-save-state {
	display: block;
	min-height: 16px;
	margin-top: 4px;
	font-size: 11px;
	font-weight: 600;
	text-align: right;
	color: var(--sml-gray-500);
}

.sml-string-save-state:empty {
	display: none;
}

.sml-string-save-state.is-unsaved {
	display: block;
	color: var(--sml-warning);
}

.sml-string-save-state.is-saving {
	display: block;
	color: var(--sml-blue);
}

.sml-string-save-state.is-saved {
	display: block;
	color: var(--sml-success);
}

.sml-string-save-state.is-error {
	display: block;
	color: var(--sml-error);
}

.sml-string-translation {
	width: 100%;
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius);
	padding: 8px 10px;
	font-size: 13px;
	box-sizing: border-box;
	transition: border-color var(--sml-transition), box-shadow var(--sml-transition);
}

.sml-string-card.is-dirty .sml-string-translation {
	border-color: var(--sml-orange);
}

.sml-string-translation:focus {
	border-color: var(--sml-primary);
	box-shadow: var(--sml-shadow-focus);
	outline: none;
}

textarea.sml-string-translation {
	resize: vertical;
	min-height: 70px;
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius);
	background: #fff;
}

.sml-skeleton-line {
	height: 10px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--sml-gray-100), var(--sml-gray-200), var(--sml-gray-100));
	background-size: 240px 100%;
	animation: smlSkeletonPulse 1.2s linear infinite;
	margin-bottom: 10px;
}

.sml-skeleton-line--small {
	width: 30%;
}

.sml-skeleton-line--large {
	width: 85%;
	margin-bottom: 0;
}

@keyframes smlSkeletonPulse {
	0% {
		background-position: 0 0;
	}
	100% {
		background-position: 240px 0;
	}
}

/* ----------------------------------------------------------------
 * String Translation – Pagination & Toast
 * ---------------------------------------------------------------- */
.sml-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 4px;
	margin-top: 20px;
	padding: 12px 0;
}

.sml-pagination a,
.sml-pagination span.sml-page-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 6px;
	border: 1px solid var(--sml-border);
	border-radius: var(--sml-radius);
	font-size: 13px;
	color: var(--sml-gray-600);
	text-decoration: none;
	background: #fff;
	transition: all var(--sml-transition);
	cursor: pointer;
}

.sml-pagination a:hover {
	background: var(--sml-gray-100);
	border-color: var(--sml-gray-300);
	color: var(--sml-gray-800);
}

.sml-pagination .current {
	background: var(--sml-gray-700);
	color: #fff;
	border-color: var(--sml-gray-700);
	font-weight: 600;
	cursor: default;
}

.sml-pagination .sml-pagination-info {
	font-size: 12px;
	color: var(--sml-gray-500);
	margin-left: 8px;
}

.sml-pagination .sml-page-dots {
	color: var(--sml-gray-400);
	padding: 0 4px;
}


/* ----------------------------------------------------------------
 * String Translation – Empty State
 * ---------------------------------------------------------------- */
.sml-string-empty {
	text-align: center;
	padding: 48px 20px;
	color: var(--sml-gray-500);
	font-size: 14px;
}

.sml-string-empty .dashicons {
	font-size: 40px;
	width: 40px;
	height: 40px;
	color: var(--sml-gray-300);
	display: block;
	margin: 0 auto 12px;
}

/* ----------------------------------------------------------------
 * String Translation – Mobile
 * ---------------------------------------------------------------- */
@media (max-width: 782px) {
	.sml-string-toolbar-wrap {
		top: 46px;
	}

	.sml-string-toolbar {
		flex-direction: column;
	}

	.sml-string-toolbar-actions {
		width: 100%;
	}

	.sml-string-toolbar-actions .button {
		flex: 1;
		text-align: center;
		justify-content: center;
		display: inline-flex;
	}

	.sml-filter-bar input[type="search"] {
		min-width: 100%;
	}

	.sml-string-progress {
		flex-direction: column;
		align-items: flex-start;
	}

	.sml-string-progress-meta {
		width: 100%;
		justify-content: space-between;
	}

	.sml-string-card-header {
		flex-direction: column;
		align-items: flex-start;
	}

}

@media (prefers-reduced-motion: reduce) {
	.sml-skeleton-line {
		animation: none;
	}
}
