/**
 * Newsroom OS — classic admin cross-cutting polish (Phase 5).
 * Micro-interactions, typography, dark mode gaps, responsive tweaks.
 */

.nros-classic-shell {
	--nros-classic-radius: 14px;
	--nros-classic-radius-lg: 16px;
	--nros-classic-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

.nros-classic-main {
	animation: nros-classic-fade-in 0.35s var(--nros-classic-ease);
}

@keyframes nros-classic-fade-in {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.nros-classic-main {
		animation: none;
	}
}

/* Typography hierarchy */
.nros-classic-page-head__title,
.nros-chief-command__title-wrap h2,
.nros-pro-panel__title {
	letter-spacing: -0.03em;
}

.nros-dash-kpi__label,
.nros-ap-list-head,
.nros-kanban-head__label,
.nros-settings-nav .nros-settings-tab-btn {
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-size: 11px;
}

/* Card hover lift */
.nros-admin-wrap--classic-shell .nros-card,
.nros-dash-kpi,
.nros-chief-kpi-card,
.nros-chief-bento-card {
	transition:
		box-shadow 0.2s var(--nros-classic-ease),
		border-color 0.2s var(--nros-classic-ease),
		transform 0.2s var(--nros-classic-ease);
}

@media (hover: hover) {
	.nros-admin-wrap--classic-shell .nros-card:hover,
	.nros-dash-kpi:hover,
	.nros-chief-kpi-card:hover,
	.nros-chief-bento-card:hover {
		box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
		border-color: rgba(99, 102, 241, 0.22);
	}
}

/* Filter chips + view toggle */
.nros-filter-chip,
.nros-view-btn {
	transition:
		background 0.15s var(--nros-classic-ease),
		color 0.15s var(--nros-classic-ease),
		border-color 0.15s var(--nros-classic-ease),
		box-shadow 0.15s var(--nros-classic-ease);
}

.nros-filter-chip:focus-visible,
.nros-view-btn:focus-visible,
.nros-classic-sidebar__link:focus-visible,
.nros-dash-new-task:focus-visible {
	outline: 2px solid #6366f1;
	outline-offset: 2px;
}

/* Trend Radar rows */
.nros-radar-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 10px;
	margin: 0 -10px;
	border-bottom: 1px solid var(--nros-border-subtle);
	border-radius: 10px;
	transition: background 0.15s var(--nros-classic-ease);
}

.nros-radar-row:last-child {
	border-bottom: none;
}

@media (hover: hover) {
	.nros-radar-row:hover {
		background: var(--nros-bg-muted, #f8fafc);
	}
}

.nros-radar-row__body {
	flex: 1;
	min-width: 0;
	line-height: 1.35;
	padding-right: 4px;
}

.nros-radar-row__link {
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	color: var(--nros-text);
	text-decoration: none;
	margin-top: 4px;
}

@media (hover: hover) {
	.nros-radar-row__link:hover {
		color: #4338ca;
	}
}

.nros-radar-badge {
	display: inline-block;
	margin-bottom: 6px;
	font-size: 10px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 6px;
	line-height: 1.4;
}

.nros-radar-badge--default {
	background: var(--nros-accent-soft, #eef2ff);
	color: #4338ca;
	border: 1px solid var(--nros-accent-border, #c7d2fe);
}

.nros-radar-badge--hot {
	background: #fff7ed;
	color: #c2410c;
	border: 1px solid #fed7aa;
}

.nros-radar-badge--mega {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
	animation: nros-radar-pulse 1.5s ease-in-out infinite;
}

.nros-radar-badge--fresh {
	background: #ecfdf5;
	color: #047857;
	border: 1px solid #a7f3d0;
}

.nros-radar-badge--muted {
	background: transparent;
	color: var(--nros-text-muted);
	border: none;
	font-weight: 600;
	padding-left: 0;
}

@keyframes nros-radar-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.72; }
}

.nros-radar-row__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: 32px;
	height: 32px;
	padding: 0 8px;
	flex-shrink: 0;
	border: 1px solid var(--nros-border);
	background: var(--nros-surface);
	border-radius: 8px;
	color: #4338ca;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	opacity: 0;
	transform: translateX(4px);
	transition:
		opacity 0.15s var(--nros-classic-ease),
		transform 0.15s var(--nros-classic-ease),
		background 0.15s var(--nros-classic-ease),
		border-color 0.15s var(--nros-classic-ease);
}

.nros-radar-row__action-label {
	display: none;
}

@media (hover: hover) {
	.nros-radar-row:hover .nros-radar-row__action,
	.nros-comp-item:hover .nros-comp-add-btn {
		opacity: 1;
		transform: translateX(0);
	}

	.nros-radar-row__action:hover,
	.nros-comp-add-btn:hover {
		background: #eef2ff;
		border-color: #c7d2fe;
	}

	.nros-radar-row__action:hover .nros-radar-row__action-label,
	.nros-comp-add-btn:hover .nros-comp-add-btn__label {
		display: inline;
	}

	.nros-radar-row__action:hover .nros-radar-row__action-icon,
	.nros-comp-add-btn:hover .nros-comp-add-btn__icon {
		display: none;
	}
}

/* Touch / keyboard: always show action buttons */
@media (hover: none) {
	.nros-radar-row__action,
	.nros-comp-add-btn {
		opacity: 1;
		transform: none;
	}
}

.nros-radar-news-beat {
	font-size: 10px;
	font-weight: 700;
	color: #4338ca;
	margin: 0 0 8px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.nros-radar-stale-notice {
	font-size: 11px;
	color: #9a3412;
	background: #fff7ed;
	border: 1px solid #fed7aa;
	border-radius: 8px;
	padding: 8px 10px;
	margin: 0 0 12px;
	line-height: 1.4;
}

/* Competitor Watch */
.nros-comp-item {
	position: relative;
	padding: 12px 8px;
	margin: 0 -8px 8px;
	border-bottom: 1px solid var(--nros-border-subtle);
	border-radius: 10px;
	transition: background 0.15s var(--nros-classic-ease);
}

@media (hover: hover) {
	.nros-comp-item:hover {
		background: var(--nros-bg-muted, #f8fafc);
	}
}

.nros-comp-add-btn {
	opacity: 0;
	transform: translateX(4px);
	transition:
		opacity 0.15s var(--nros-classic-ease),
		transform 0.15s var(--nros-classic-ease),
		background 0.15s var(--nros-classic-ease),
		border-color 0.15s var(--nros-classic-ease);
	border: 1px solid var(--nros-border) !important;
	background: var(--nros-surface) !important;
	border-radius: 8px !important;
	color: #4338ca !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	padding: 0 10px !important;
	min-width: 32px !important;
	height: 32px !important;
	gap: 4px;
}

.nros-comp-add-btn__label {
	display: none;
}

.nros-kanban-card__title-link {
	color: inherit;
	text-decoration: none;
}

.nros-kanban-card__title-link:hover {
	color: #4338ca;
}

@media (max-width: 1100px) {
	.nros-dash-workflow__head {
		flex-direction: column;
	}

	.nros-dash-workflow__filters {
		width: 100%;
	}
}

@media (max-width: 782px) {
	.nros-classic-sidebar__label {
		font-size: 13px;
	}

	.nros-dash-workflow__filters .nros-view-toggle {
		width: 100%;
		margin-left: 0;
		justify-content: flex-end;
	}

	.nros-radar-tabs {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.nros-radar-geo {
		width: 100%;
	}
}

/* Dark mode — classic shell */
@media (prefers-color-scheme: dark) {
	.nros-classic-shell {
		background: #0f111a;
	}

	.nros-classic-sidebar {
		background: #161824;
		border-right-color: rgba(255, 255, 255, 0.08);
	}

	.nros-classic-sidebar__link:hover,
	.nros-classic-sidebar__link.is-active {
		background: rgba(99, 102, 241, 0.14);
	}

	.nros-settings-nav .nros-settings-tab-btn.active {
		background: rgba(99, 102, 241, 0.18);
		color: #c7d2fe;
	}

	.nros-radar-stale-notice {
		background: rgba(154, 52, 18, 0.15);
		border-color: rgba(251, 146, 60, 0.35);
		color: #fdba74;
	}

	.nros-radar-badge--default {
		background: rgba(99, 102, 241, 0.18);
		border-color: rgba(129, 140, 248, 0.35);
		color: #c7d2fe;
	}
}

body.wp-admin.is-dark-theme .nros-classic-shell {
	background: #0f111a;
}

body.wp-admin.is-dark-theme .nros-classic-sidebar {
	background: #161824;
	border-right-color: rgba(255, 255, 255, 0.08);
}

body.wp-admin.is-dark-theme .nros-classic-sidebar__link:hover,
body.wp-admin.is-dark-theme .nros-classic-sidebar__link.is-active {
	background: rgba(99, 102, 241, 0.14);
}

body.wp-admin.is-dark-theme .nros-settings-nav .nros-settings-tab-btn.active {
	background: rgba(99, 102, 241, 0.18);
	color: #c7d2fe;
}

body.wp-admin.is-dark-theme .nros-radar-stale-notice {
	background: rgba(154, 52, 18, 0.15);
	border-color: rgba(251, 146, 60, 0.35);
	color: #fdba74;
}
