/**
 * Newsroom OS — ⌘K / Ctrl+K command palette.
 */

.nros-palette-overlay {
	position: fixed;
	inset: 0;
	z-index: 100100;
	background: rgba(15, 23, 42, 0.45);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 12vh 16px 16px;
	backdrop-filter: blur(2px);
}

.nros-palette-overlay[hidden] {
	display: none !important;
}

.nros-palette {
	width: 100%;
	max-width: 520px;
	background: var(--nros-surface, #fff);
	border: 1px solid var(--nros-border, #c3c4c7);
	border-radius: 12px;
	box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
	overflow: hidden;
	color: var(--nros-text, #1d2327);
}

.nros-palette__input {
	width: 100%;
	box-sizing: border-box;
	border: none;
	border-bottom: 1px solid var(--nros-border-subtle, #e2e4e7);
	padding: 14px 16px;
	font-size: 15px;
	outline: none;
	background: var(--nros-surface, #fff);
	color: var(--nros-text, #1d2327);
}

.nros-palette__input:focus {
	box-shadow: inset 0 0 0 2px var(--nros-accent, #2271b1);
}

.nros-palette__list {
	max-height: 320px;
	overflow-y: auto;
	margin: 0;
	padding: 6px 0;
	list-style: none;
}

.nros-palette__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	cursor: pointer;
	font-size: 13px;
}

.nros-palette__item:hover,
.nros-palette__item.is-active {
	background: var(--nros-accent-soft, #f0f6fc);
}

.nros-palette__item-label {
	font-weight: 600;
}

.nros-palette__item-hint {
	font-size: 11px;
	color: var(--nros-text-subtle, #646970);
	flex-shrink: 0;
}

.nros-palette__empty {
	padding: 16px;
	font-size: 13px;
	color: var(--nros-text-muted, #646970);
	text-align: center;
}

.nros-palette__foot {
	padding: 8px 16px;
	font-size: 11px;
	color: var(--nros-text-subtle, #646970);
	border-top: 1px solid var(--nros-border-subtle, #e2e4e7);
	background: var(--nros-bg-muted, #f6f7f7);
}

@media (prefers-color-scheme: dark) {
	.nros-palette-overlay {
		background: rgba(0, 0, 0, 0.55);
	}
}

body.wp-admin.is-dark-theme .nros-palette-overlay {
	background: rgba(0, 0, 0, 0.55);
}
