/* ========== Theme variables ========== */
.seekysense-scope {
	--seeky-color-primary: #2271b1;
	--seeky-color-primary-text: #ffffff;
	--seeky-color-secondary: #f8fafc;
	--seeky-color-secondary-text: #2271b1;
	--seeky-color-button-border: #2271b1;
	--seeky-color-input-bg: #ffffff;
	--seeky-color-input-text: #111111;
	--seeky-color-input-border: #d0d7de;
	--seeky-color-focus: #2271b1;
	--seeky-color-progress: #2d8cff;
	--seeky-box-bg: #ffffff;
	--seeky-box-border: #dddddd;
	--seeky-box-radius: 8px;
	--seeky-box-padding: 16px;
	--seeky-box-shadow: none;
	--seeky-gap: 10px;
	--seeky-control-h: 42px;
	--seeky-font-size: 14px;
	--seeky-input-bg: var(--seeky-color-input-bg, #ffffff);
	--seeky-input-text: var(--seeky-color-input-text, #111111);
	--seeky-input-border: var(--seeky-color-input-border, #d0d7de);
	--seeky-placeholder: #6b7280;
	--seeky-button-radius: 8px;
	--seeky-focus-ring-on: 1;
}

/* ========== Progress ========== */
.seekysense-admin-wrap .seekysense-progress,
.seekysense-search .seekysense-progress {
	background: #f0f0f0;
	border-radius: 6px;
	height: 12px;
	margin: 12px 0;
	overflow: hidden;
	position: relative;
	border: 1px solid #e5e7eb;
}

.seekysense-progress__bar {
	background: var(--seeky-color-progress, #2d8cff);
	height: 100%;
	width: 0;
	transition: width 0.3s ease;
}

/* ========== Log ========== */
.seekysense-log {
	font-family: Menlo, Consolas, monospace;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 12px;
	height: 180px;
	overflow: auto;
}

/* ========== Search container (frontend UI) ========== */
.seekysense-search {
	border: 1px solid var(--seeky-box-border, #ddd);
	border-radius: var(--seeky-box-radius, 8px);
	padding: var(--seeky-box-padding, 16px);
	margin: 24px 0;
	background: var(--seeky-box-bg, #fff);
	box-shadow: var(--seeky-box-shadow, none);
	overflow: hidden;
}

.seekysense-search input,
.seekysense-search select,
.seekysense-search button {
	box-sizing: border-box;
	height: var(--seeky-control-h, 42px);
	border-radius: var(--seeky-button-radius, 8px);
	min-width: 0;
	font-size: var(--seeky-font-size, 14px);
}

.seekysense-search__controls {
	display: flex;
	flex-wrap: wrap;
	gap: var(--seeky-gap, 10px);
	align-items: stretch;
}

.seekysense-field { display: contents; }

.seekysense-search__input {
	flex: 1 1 280px;
	min-width: 240px;
	padding: 0 12px;
}

.seekysense-search__threshold { flex: 0 0 170px; }
.seekysense-search__type { flex: 0 0 130px; }

.seekysense-search__input,
.seekysense-search__threshold,
.seekysense-search__type {
	background: var(--seeky-input-bg, var(--seeky-color-input-bg, #fff));
	color: var(--seeky-input-text, var(--seeky-color-input-text, #111));
	border: 1px solid var(--seeky-input-border, var(--seeky-color-input-border, #d0d7de));
	line-height: 1;
}

.seekysense-search__input::placeholder { color: var(--seeky-placeholder, #6b7280); }

/* Native select: custom arrow, tidy spacing */
.seekysense-search__threshold,
.seekysense-search__type {
	appearance: none;
	background-image:
		linear-gradient(45deg, transparent 50%, #6b7280 50%),
		linear-gradient(135deg, #6b7280 50%, transparent 50%);
	background-position:
		calc(100% - 18px) 50%,
		calc(100% - 13px) 50%;
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	padding-right: 30px;
}

/* Buttons */
.seekysense-btn {
	background: var(--seeky-color-secondary, #f8fafc);
	color: var(--seeky-color-secondary-text, #2271b1);
	border-color: var(--seeky-color-button-border, #2271b1);
	padding: 0 14px;
	border-radius: var(--seeky-button-radius, 8px);
	cursor: pointer;
	transition: background .15s ease, box-shadow .15s ease, border-color .15s ease, transform .05s ease;
}
.seekysense-btn:hover { background: #f1f5f9; }
.seekysense-btn:active { transform: translateY(0.5px); }

.seekysense-btn--primary {
	background: var(--seeky-color-primary, #2271b1);
	color: var(--seeky-color-primary-text, #fff);
	border-color: var(--seeky-color-button-border, #2271b1);
}
.seekysense-btn--primary:hover { filter: brightness(0.95); }

/* Focus ring for a11y */
.seekysense-search__input:focus,
.seekysense-search__threshold:focus,
.seekysense-search__type:focus,
.seekysense-btn:focus {
	outline: 2px solid transparent;
	box-shadow:
		0 0 0 calc(var(--seeky-focus-ring-on, 1) * 3px)
		color-mix(in srgb, var(--seeky-color-focus, #2271b1) 25%, transparent);
}

/* Status + results */
.seekysense-search__status {
	min-height: 1.2em;
	margin-top: 10px;
	color: #4b5563;
}

.seekysense-search__results {
	list-style: none;
	padding-left: 0;
	margin: 16px 0 0;
}

.seekysense-search__results li {
	border-bottom: 1px solid #eee;
	padding: 12px 0;
}
.seekysense-search__results h4 {
	margin: 0 0 4px;
	font-size: 1rem;
}

.seekysense-search__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin: 0 0 6px;
	color: #4b5563;
	font-size: 0.9rem;
}

.seekysense-search__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 8px;
	height: 20px;
	border-radius: 999px;
	background: #e0f2fe;
	color: #0369a1;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
}

/* ========== Colors tab (admin setup) ========== */
.seekysense-colors-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-top: 16px;
}

.seekysense-color-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	min-width: 0; /* evita overflow con contenuti lunghi */
}

.seekysense-color-label { font-weight: 600; }
.seekysense-color-input { width: 100%; }

.seekysense-colors-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 20px 0;
}

.seekysense-colors-preview {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 16px;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.seekysense-colors-preview__row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.seekysense-colors-preview__field {
	display: flex;
	gap: 10px;
	align-items: center;
}

.seekysense-colors-warning { margin-top: 8px; font-weight: 600; }
.seekysense-colors-warning[data-status="warning"] { color: #b45309; }
.seekysense-colors-warning[data-status="ok"] { color: #047857; }

/* Uniforma i color picker nel tab Colors */
.seekysense-color-field .wp-picker-container {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.seekysense-color-field .wp-color-result.button,
.seekysense-color-field .wp-picker-input-wrap input[type="text"],
.seekysense-color-field .wp-picker-clear.button {
	height: 36px;
	line-height: 36px;
	border-radius: 6px;
}

/* ========== Search box tab (admin setup) ========== */
.seekysense-searchbox-form {
	margin-top: 16px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.seekysense-searchbox-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* ↑ 220 -> 260 */
	gap: 16px;
}

.seekysense-searchbox-grid--two {
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* ↑ 260 -> 300 */
}

.seekysense-searchbox-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	min-width: 0; /* evita overflow con contenuti lunghi */
}

.seekysense-searchbox-label {
	font-weight: 600;
	margin-bottom: 6px; /* migliora leggibilità */
}

.seekysense-searchbox-color { width: 100%; }

.seekysense-searchbox-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}

/* Uniforma i color picker nel tab Search Box Style */
.seekysense-searchbox-field .wp-picker-container {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.seekysense-searchbox-field .wp-color-result.button {
	height: 36px;
	line-height: 36px;
	padding: 0 10px;
	border-radius: 6px;
}
.seekysense-searchbox-field .wp-picker-input-wrap input[type="text"] {
	height: 36px;
	line-height: 36px;
	padding: 0 10px;
	box-sizing: border-box;
}
.seekysense-searchbox-field .wp-picker-clear.button {
	height: 36px;
	line-height: 34px;
	border-radius: 6px;
}

/* Campi testo al 100% dentro le card */
.seekysense-searchbox-field .regular-text,
.seekysense-searchbox-field input[type="text"],
.seekysense-searchbox-field input[type="number"],
.seekysense-searchbox-field select {
	width: 100%;
	box-sizing: border-box;
	height: 42px;
	line-height: 42px;
	padding: 0 12px;
	border-radius: 8px;
}

/* Textarea più comoda */
.seekysense-searchbox-field textarea {
	width: 100%;
	box-sizing: border-box;
	min-height: 80px;
	line-height: 1.4;
	padding: 10px 12px;
	border-radius: 8px;
}

/* Descrizioni sotto i campi */
.seekysense-searchbox-field .description,
.seekysense-searchbox-field small.description {
	display: block;
	margin-top: 6px;
	color: #6b7280;
}

/* Anteprima stile */
.seekysense-searchbox-preview {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 16px;
	background: #fff;
	margin-top: 4px;
}

/* ========== Loading spinner ========== */
.seekysense-btn[data-loading="1"] {
	position: relative;
	pointer-events: none;
}

.seekysense-btn[data-loading="1"]::after {
	content: "";
	position: absolute;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	inset: 0;
	margin: auto;
	animation: seekysense-spin 0.8s linear infinite;
}

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

.seekysense-search__input:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ========== Block placeholder (unchanged) ========== */
.seekysense-block-placeholder {
	padding: 16px;
	border: 1px dashed #ccd0d4;
	border-radius: 4px;
}

/* ========== Responsive tweaks (frontend) ========== */
@media (max-width: 600px) {
	.seekysense-search__input { flex-basis: 100%; min-width: 100%; }
	.seekysense-search__threshold { flex: 1 0 180px; }
	.seekysense-btn { flex: 1 0 calc(50% - var(--seeky-gap)/2); min-width: 120px; }
}

/* ========== Admin responsive tweak (setup) ========== */
@media (max-width: 782px) { /* breakpoint admin WP */
	.seekysense-searchbox-grid,
	.seekysense-searchbox-grid--two {
		grid-template-columns: 1fr;
	}
}

/* ========== Debug panel ========== */
.seekysense-debug-panel {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 16px;
	margin-top: 24px;
}

.seekysense-debug-panel__controls {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-top: 16px;
}

.seekysense-debug-panel__label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.seekysense-debug-panel textarea,
.seekysense-debug-panel input,
.seekysense-debug-panel select {
	width: 100%;
	box-sizing: border-box;
}

.seekysense-debug-panel textarea {
	resize: vertical;
	min-height: 60px;
}

.seekysense-debug-panel__actions {
	display: flex;
	gap: 12px;
	margin-top: 16px;
}

.seekysense-debug-panel__status {
	font-weight: 600;
	margin-top: 12px;
	min-height: 1.2em;
}

.seekysense-debug-panel__log-wrapper { margin-top: 12px; }
.seekysense-debug-log { height: 220px; }

.seekysense-debug-panel__results { margin-top: 20px; }
.seekysense-debug-panel__summary { font-weight: 600; margin: 0 0 8px; }

.seekysense-debug-panel__results-list {
	list-style: decimal;
	margin: 12px 0 0;
	padding-left: 20px;
}

.seekysense-debug-panel__results-item {
	border-bottom: 1px solid #eee;
	padding: 10px 0;
}

.seekysense-debug-panel__results-title {
	font-weight: 600;
	margin: 0 0 4px;
}

.seekysense-debug-panel__results-meta,
.seekysense-debug-panel__results-stats {
	font-size: 12px;
	color: #555;
	margin: 2px 0;
}

.seekysense-debug-panel__results-link {
	display: inline-block;
	font-size: 12px;
	margin-bottom: 4px;
	overflow-wrap: anywhere;
}

.seekysense-debug-panel__results-excerpt { margin: 4px 0 0; }

.seekysense-debug-json {
	font-size: 11px;
	background: #f8f8f8;
	border: 1px solid #eee;
	border-radius: 4px;
	padding: 6px;
	margin: 4px 0 8px;
	white-space: pre-wrap;
}

/* ---------- 2.0 admin: Model tab, status, recalculation, dialog ---------- */
.seekysense-model__intro { max-width: 900px; font-size: 14px; }
.seekysense-model__webgpu, .seekysense-status, .seekysense-model__status { max-width: 1100px; }
.seekysense-model__webgpu { padding: 8px 12px; border-left: 4px solid #c3c4c7; background: #fff; }
.seekysense-model__webgpu.is-ok { border-left-color: #00a32a; }
.seekysense-model__webgpu.is-warn { border-left-color: #dba617; }
.seekysense-profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 16px 0; max-width: 1400px; }
.seekysense-profile { display: flex; flex-direction: column; background: #fff; border: 1px solid #c3c4c7; border-radius: 8px; padding: 16px; }
.seekysense-profile.is-active { border: 2px solid #2271b1; box-shadow: 0 0 0 3px rgba(34, 113, 177, .12); }
.seekysense-profile.needs-webgpu { opacity: .85; }
.seekysense-profile__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seekysense-profile__head h3 { margin: 0; font-size: 18px; }
.seekysense-profile__desc { margin: 8px 0 12px; color: #50575e; }
.seekysense-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.seekysense-badge--active { background: #2271b1; color: #fff; }
.seekysense-badge--beta { background: #fcf0e3; color: #8a4b00; }
.seekysense-profile__facts { margin: 0; display: grid; grid-template-columns: 1fr; gap: 2px; }
.seekysense-profile__facts dt { font-weight: 600; margin-top: 8px; color: #1d2327; }
.seekysense-profile__facts dd { margin: 0; color: #3c434a; }
.seekysense-profile__facts ul { margin: 2px 0 0 18px; list-style: disc; }
.seekysense-profile__facts li { margin: 0; }
.seekysense-profile__times { color: #646970; font-size: 12px; }
.seekysense-profile__warnings { margin: 12px 0 0; padding: 8px 12px 8px 28px; background: #fcf9e8; border-radius: 6px; list-style: disc; }
.seekysense-profile__warnings:empty { display: none; }
.seekysense-profile__foot { margin-top: auto; padding-top: 16px; }
.seekysense-profile__current { font-weight: 600; color: #2271b1; }
.seekysense-model__notes { max-width: 1100px; }

.seekysense-status__grid { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 12px 0; padding: 12px 16px; background: #fff; border: 1px solid #dcdcde; border-radius: 6px; }
.seekysense-status__grid dt { font-weight: 600; }
.seekysense-status__grid dd { margin: 0; }
.seekysense-status__grid .is-ok { color: #007017; font-weight: 600; }
.seekysense-status__grid .is-warn { color: #996800; font-weight: 600; }

.seekysense-recalc__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.seekysense-recalc__force { margin-left: 8px; }
.seekysense-phases { margin: 12px 0; padding: 0; list-style: none; max-width: 900px; }
.seekysense-phase { display: grid; grid-template-columns: 260px 1fr; gap: 4px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f0f1; }
.seekysense-phase .seekysense-progress { height: 10px; margin: 0; }
.seekysense-phase__detail { grid-column: 2; font-size: 12px; color: #50575e; }
.seekysense-phase[data-state="done"] .seekysense-phase__label::before { content: "✓ "; color: #00a32a; }
.seekysense-phase[data-state="running"] .seekysense-phase__label { font-weight: 600; }
.seekysense-phase[data-state="paused"] .seekysense-phase__label::before { content: "❚❚ "; color: #996800; }
.seekysense-phase[data-state="skipped"] { opacity: .7; }
.seekysense-recalc__summary { font-weight: 600; }
.seekysense-log-wrap { margin-top: 12px; max-width: 900px; }
.seekysense-log-wrap .seekysense-log { max-height: 240px; overflow: auto; font-family: monospace; font-size: 12px; background: #fff; padding: 8px; border: 1px solid #dcdcde; }

.seekysense-dialog { max-width: 560px; width: calc(100% - 32px); border: 0; border-radius: 10px; padding: 24px; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.seekysense-dialog::backdrop { background: rgba(0, 0, 0, .45); }
.seekysense-dialog h2 { margin-top: 0; }
.seekysense-dialog__facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.seekysense-dialog__facts dt { font-weight: 600; }
.seekysense-dialog__facts dd { margin: 0; }
.seekysense-dialog__changes { margin: 12px 0 0 18px; list-style: disc; }
.seekysense-dialog__changes .is-warn { color: #996800; font-weight: 600; }
.seekysense-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.seekysense-dialog__status { min-height: 1.5em; }

.seekysense-admin-wrap [hidden], .seekysense-search [hidden], .seekysense-dialog [hidden] { display: none !important; }

/* ---------- 2.0 front-end results ---------- */
.seekysense-search__results .seekysense-result { display: flex; gap: 12px; align-items: flex-start; }
.seekysense-result__thumb { flex: 0 0 72px; width: 72px; height: 72px; object-fit: cover; border-radius: 6px; background: #f1f5f9; }
.seekysense-result--video .seekysense-result__thumb { flex-basis: 128px; width: 128px; height: 72px; }
.seekysense-result__body { flex: 1; min-width: 0; }
.seekysense-result__body h4 { margin: 0 0 4px; }
.seekysense-result__excerpt { margin: 4px 0 0; color: #475569; font-size: .92em; }
.seekysense-result__score { margin-left: auto; font-variant-numeric: tabular-nums; color: #64748b; font-size: .85em; }
.seekysense-search__badge.is-image { background: #ede9fe; color: #5b21b6; }
.seekysense-search__badge.is-native { background: #e0f2fe; color: #075985; }
.seekysense-result__times { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.seekysense-result__time { padding: 2px 8px; border-radius: 999px; background: #0f172a; color: #fff !important; text-decoration: none; font-size: .85em; font-variant-numeric: tabular-nums; }
.seekysense-result__time.is-secondary { background: #e2e8f0; color: #0f172a !important; }
.seekysense-search__notice { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: #fef9c3; color: #713f12; }
.seekysense-search__image-menu, .seekysense-search__query-image { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.seekysense-search__query-image img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid #cbd5e1; }

/* ---------- 2.0 crop dialog ---------- */
.seekysense-crop { border: 0; border-radius: 12px; padding: 16px; max-width: min(960px, calc(100vw - 16px)); box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.seekysense-crop::backdrop { background: rgba(15, 23, 42, .6); }
.seekysense-crop h2 { margin: 0 0 4px; font-size: 1.1rem; }
.seekysense-crop__help { margin: 0 0 12px; color: #475569; font-size: .9rem; }
.seekysense-crop__stage { position: relative; margin: 0 auto; user-select: none; -webkit-user-select: none; }
.seekysense-crop__canvas { display: block; width: 100%; height: 100%; }
.seekysense-crop__rect { position: absolute; box-sizing: border-box; border: 2px solid #fff; outline: 1px solid rgba(0, 0, 0, .6); box-shadow: 0 0 0 9999px rgba(15, 23, 42, .5); cursor: move; touch-action: none; }
.seekysense-crop__rect:focus-visible { outline: 3px solid #2563eb; }
.seekysense-crop__handle { position: absolute; width: 22px; height: 22px; background: #fff; border: 2px solid #1e293b; border-radius: 50%; }
.seekysense-crop__handle[data-h="nw"] { left: -12px; top: -12px; cursor: nwse-resize; }
.seekysense-crop__handle[data-h="ne"] { right: -12px; top: -12px; cursor: nesw-resize; }
.seekysense-crop__handle[data-h="sw"] { left: -12px; bottom: -12px; cursor: nesw-resize; }
.seekysense-crop__handle[data-h="se"] { right: -12px; bottom: -12px; cursor: nwse-resize; }
.seekysense-crop__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.seekysense-crop--confirm { max-width: 460px; }
.seekysense-crop__actions .seekysense-btn { min-height: 44px; padding: 0 16px; }
.seekysense-crop__stage { touch-action: none; }
.seekysense-debug__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; max-width: 1200px; }
.seekysense-debug__box img { max-width: 100%; border: 1px solid #dcdcde; border-radius: 6px; }
.seekysense-debug__table { max-width: 1200px; margin-bottom: 24px; }
.seekysense-debug-panel .seekysense-search { max-width: 1200px; margin: 16px 0; }
.seekysense-videos { max-width: 1200px; margin-top: 24px; }
.seekysense-videos__thumb { width: 96px; height: 54px; object-fit: cover; border-radius: 4px; float: left; margin-right: 8px; }
.seekysense-videos__progress { clear: both; margin-top: 6px; }
.seekysense-videos__progress .seekysense-progress { height: 8px; margin: 4px 0; }
.seekysense-videos__detail { font-size: 12px; color: #50575e; }

/* ---------- 2.0 responsive ---------- */
.seekysense-result__time { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; }
@media (pointer: coarse) {
	.seekysense-result__time { min-height: 40px; }
}
@media (max-width: 480px) {
	.seekysense-search__results .seekysense-result { gap: 10px; }
	.seekysense-result__thumb { flex-basis: 56px; width: 56px; height: 56px; }
	.seekysense-result--video .seekysense-result__thumb { flex-basis: 96px; width: 96px; height: 54px; }
	.seekysense-result__body h4 { overflow-wrap: anywhere; }
}
@media (max-width: 782px) {
	.seekysense-status__grid,
	.seekysense-dialog__facts { grid-template-columns: 1fr; gap: 0; }
	.seekysense-status__grid dt,
	.seekysense-dialog__facts dt { margin-top: 8px; }
	.seekysense-status__grid dd,
	.seekysense-dialog__facts dd { overflow-wrap: anywhere; }
	.seekysense-phase { grid-template-columns: 1fr; }
	.seekysense-phase__detail { grid-column: 1; }
	.seekysense-recalc__force { margin-left: 0; }
	/* Tables become stacked cards; each cell shows its column label (data-label). */
	.seekysense-videos__table thead,
	.seekysense-debug__table thead { display: none; }
	.seekysense-videos__table,
	.seekysense-videos__table tbody,
	.seekysense-videos__table tr,
	.seekysense-videos__table td,
	.seekysense-debug__table,
	.seekysense-debug__table tbody,
	.seekysense-debug__table tr,
	.seekysense-debug__table td { display: block; width: 100%; box-sizing: border-box; }
	.seekysense-videos__table tr,
	.seekysense-debug__table tr { padding: 8px 0; border-bottom: 1px solid #dcdcde; }
	.seekysense-videos__table td,
	.seekysense-debug__table td { padding: 4px 12px; overflow-wrap: anywhere; }
	.seekysense-videos__table td[data-label]::before,
	.seekysense-debug__table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: #50575e; }
	.seekysense-videos__table select { width: 100%; max-width: 100%; }
	.seekysense-videos__thumb { float: none; display: block; margin: 0 0 6px; }
}
.seekysense-debug__box p { display: flex; flex-wrap: wrap; gap: 8px; }
.seekysense-debug__box .button { white-space: normal; height: auto; min-height: 30px; }

/* ---------- 2.0 front-end polish ---------- */
.seekysense-search__controls .seekysense-field[hidden] { display: none; }
.seekysense-search__type,
.seekysense-search__threshold { padding-left: 12px; }
.seekysense-search__image-btn { white-space: normal; text-align: left; display: inline-flex; align-items: center; gap: 6px; }
.seekysense-search__status { font-size: .95em; }
.seekysense-search__results { margin-top: 12px; }
.seekysense-search__results .seekysense-result { padding: 14px 12px; margin: 0 -12px; border-bottom: 1px solid #eef1f3; border-radius: 12px; transition: background .15s ease; }
.seekysense-search__results .seekysense-result:last-child { border-bottom: 0; }
.seekysense-search__results .seekysense-result:hover { background: color-mix(in srgb, var(--seeky-color-primary, #2271b1) 6%, #fff); }
.seekysense-result__thumb { flex-basis: 84px; width: 84px; height: 84px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.seekysense-result--video .seekysense-result__thumb { flex-basis: 150px; width: 150px; height: 84px; }
.seekysense-result__body h4 { font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.seekysense-result__body h4 a { text-decoration: none; }
.seekysense-result__body h4 a:hover { text-decoration: underline; }
.seekysense-result__excerpt { color: #5b6770; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.seekysense-result--product .seekysense-search__badge:first-child { background: color-mix(in srgb, var(--seeky-color-primary, #2271b1) 14%, #fff); color: color-mix(in srgb, var(--seeky-color-primary, #2271b1) 80%, #000); }
.seekysense-result--video .seekysense-search__badge:first-child { background: #0f172a; color: #fff; }
.seekysense-result__time { background: var(--seeky-color-primary, #0f172a); }
.seekysense-result__time.is-secondary { background: color-mix(in srgb, var(--seeky-color-primary, #2271b1) 12%, #fff); color: #0f172a !important; }
.seekysense-results-more { list-style: none; text-align: center; padding: 12px 0 4px !important; border-bottom: 0 !important; }
.seekysense-results-more .seekysense-btn { height: auto; padding: 10px 18px; }
@media (max-width: 640px) {
	.seekysense-search__input { flex: 1 1 100%; min-width: 0; }
	.seekysense-search__threshold, .seekysense-search__type { flex: 1 1 calc(50% - var(--seeky-gap, 10px)); }
	.seekysense-search__image-btn { flex: 1 1 100%; justify-content: center; }
	.seekysense-search__controls .seekysense-btn--primary, .seekysense-search__controls [data-action="clear"] { flex: 1 1 calc(50% - var(--seeky-gap, 10px)); }
	.seekysense-search__results .seekysense-result { margin: 0 -4px; padding: 12px 4px; }
}
.seekysense-search .seekysense-search__results h4 a { text-decoration: none; }
.seekysense-search .seekysense-search__results h4 a:hover, .seekysense-search .seekysense-search__results h4 a:focus { text-decoration: underline; }

/* ---------- 2.0 buttons: full hover/focus/active states (themes like Storefront restyle button:hover) ---------- */
.seekysense-btn.seekysense-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	border: 1px solid var(--seeky-color-button-border, #cbd5e1);
	background: var(--seeky-color-secondary, #fff);
	color: var(--seeky-color-secondary-text, #1d4ed8);
	box-shadow: none;
	text-shadow: none;
}
.seekysense-btn.seekysense-btn:hover,
.seekysense-btn.seekysense-btn:focus-visible {
	background: color-mix(in srgb, var(--seeky-color-primary, #2271b1) 9%, var(--seeky-color-secondary, #fff));
	border-color: color-mix(in srgb, var(--seeky-color-primary, #2271b1) 45%, var(--seeky-color-button-border, #cbd5e1));
	color: var(--seeky-color-secondary-text, #1d4ed8);
	filter: none;
}
.seekysense-btn.seekysense-btn:active { transform: translateY(1px); }
.seekysense-btn.seekysense-btn--primary {
	background: var(--seeky-color-primary, #2271b1);
	border-color: var(--seeky-color-primary, #2271b1);
	color: var(--seeky-color-primary-text, #fff);
}
.seekysense-btn.seekysense-btn--primary:hover,
.seekysense-btn.seekysense-btn--primary:focus-visible {
	background: color-mix(in srgb, var(--seeky-color-primary, #2271b1) 86%, #000);
	border-color: color-mix(in srgb, var(--seeky-color-primary, #2271b1) 86%, #000);
	color: var(--seeky-color-primary-text, #fff);
}
.seekysense-btn.seekysense-btn--ghost { border-color: transparent; background: transparent; }
.seekysense-btn.seekysense-btn--ghost:hover,
.seekysense-btn.seekysense-btn--ghost:focus-visible {
	background: color-mix(in srgb, var(--seeky-color-primary, #2271b1) 9%, transparent);
	border-color: transparent;
}
.seekysense-btn.seekysense-btn:focus-visible {
	outline: 2px solid transparent;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--seeky-color-focus, #2271b1) 30%, transparent);
}
.seekysense-btn.seekysense-btn:disabled,
.seekysense-btn.seekysense-btn[aria-disabled="true"] { opacity: .6; cursor: default; transform: none; }
.seekysense-icon { flex: 0 0 auto; width: 18px; height: 18px; }
.seekysense-search__image-btn .seekysense-icon { width: 20px; height: 20px; }
.seekysense-search__image-menu .seekysense-btn { height: auto; min-height: var(--seeky-control-h, 42px); padding: 8px 14px; }

/* ---------- 2.0 narrow containers (sidebars, widgets): same stacked layout as phones ---------- */
.seekysense-search { container-type: inline-size; }
@container (max-width: 640px) {
	.seekysense-search__input { flex: 1 1 100%; min-width: 0; }
	.seekysense-search__threshold, .seekysense-search__type { flex: 1 1 calc(50% - var(--seeky-gap, 10px)); }
	.seekysense-search__image-btn { flex: 1 1 100%; justify-content: center; }
	.seekysense-search__controls .seekysense-btn--primary, .seekysense-search__controls [data-action="clear"] { flex: 1 1 calc(50% - var(--seeky-gap, 10px)); }
	.seekysense-search__results .seekysense-result { margin: 0 -4px; padding: 12px 4px; }
	.seekysense-result__thumb { flex-basis: 56px; width: 56px; height: 56px; }
	.seekysense-result--video .seekysense-result__thumb { flex-basis: 96px; width: 96px; height: 54px; }
	.seekysense-result__body h4 { overflow-wrap: anywhere; }
}
@container (max-width: 360px) {
	.seekysense-search__threshold, .seekysense-search__type { flex: 1 1 100%; }
	.seekysense-search__image-menu .seekysense-btn { flex: 1 1 100%; }
}
