/* Newsfeed Premium UX — flat, distraction-free */

.osk-nf-fusion-wrap {
	--osk-nf-flat-bg: #0c0c0e;
	--osk-nf-flat-surface: #121214;
	--osk-nf-flat-surface-2: #18181b;
	--osk-nf-flat-border: rgba(255, 255, 255, .07);
	--osk-nf-flat-border-strong: rgba(255, 255, 255, .11);
	--osk-nf-flat-text: rgba(255, 255, 255, .92);
	--osk-nf-flat-muted: rgba(255, 255, 255, .48);
	--osk-nf-flat-accent: var(--main, #e60000);
	--osk-nf-fusion-surface: var(--osk-nf-flat-surface);
	--osk-nf-fusion-border: var(--osk-nf-flat-border);
}

/* Newsfeed — stesso offset navbar di home / watch / music (non attaccato sotto header) */

/* Layout centrale — colonna focus */
.osk-nf-fusion-wrap .nf-center-col {
	padding-left: 0;
	padding-right: 0;
}
.osk-nf-fusion-wrap .nf-shell {
	background: transparent;
}
.osk-nf-feed-stream {
	position: relative;
	padding: 0 2px;
}
.osk-nf-write-zone {
	margin-bottom: 12px;
	padding: 0;
}
.osk-nf-fusion-wrap .osk-nf-lens {
	margin-left: 0;
	margin-right: 0;
	border-radius: clamp(12px, 2.4vw, 18px);
	border: 1px solid var(--osk-nf-flat-border);
	background: var(--osk-nf-flat-surface);
}
@media (max-width: 575.98px) {
	.osk-nf-lens__actions {
		width: 100%;
	}
	.osk-nf-lens__follow,
	.osk-nf-lens__hub {
		flex: 1 1 calc(50% - 4px);
		justify-content: center;
		min-width: 0;
	}
	.osk-nf-lens__tabs {
		margin: 0 -2px;
		padding-bottom: 10px;
	}
}
.osk-nf-fusion-wrap .osk-nf-lens--cover {
	border-color: var(--osk-nf-flat-border-strong);
}

/* Sidebars — flat, silenziose */
.osk-nf-fusion-wrap .nf-sidebar-left,
.osk-nf-fusion-wrap .nf-sidebar-right {
	top: var(--osk-page-top, 78px);
	max-height: calc(100vh - var(--osk-page-top, 78px) - 12px);
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, .12) transparent;
}
.osk-nf-bussola-wrap .osk-nf-bussola,
.osk-nf-scout-wrap .osk-nf-scout {
	background: var(--osk-nf-flat-surface);
	border: 1px solid var(--osk-nf-flat-border);
	border-radius: 14px;
	box-shadow: none;
}
.osk-nf-bussola__item:hover,
.osk-nf-bussola__item.is-active {
	background: rgba(255, 255, 255, .05);
	border-color: var(--osk-nf-flat-border-strong);
	box-shadow: none;
}
.osk-nf-bussola__item--main.is-active {
	background: rgba(230, 0, 0, .1);
	border-color: rgba(230, 0, 0, .24);
}
.osk-nf-scout__block {
	background: var(--osk-nf-flat-surface-2);
	border: 1px solid var(--osk-nf-flat-border);
	border-radius: 12px;
	box-shadow: none;
}
.osk-nf-bussola-wrap .osk-nf-control-box {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

/* Post nel feed — flat card */
.osk-nf-fusion-wrap .newsfeed-post-item.osk-nf-post-card,
.osk-nf-fusion-wrap .newsfeed-post-item.card {
	background: #16161b !important;
	border: 1px solid rgba(255, 255, 255, .1) !important;
	border-radius: 14px !important;
	box-shadow: none !important;
	margin-bottom: 10px !important;
	padding: 14px 16px 12px;
	transition: border-color .15s ease;
}
.osk-nf-fusion-wrap .newsfeed-post-item.osk-nf-post-card:hover,
.osk-nf-fusion-wrap .newsfeed-post-item.card:hover {
	border-color: rgba(255, 255, 255, .16) !important;
	box-shadow: none !important;
	transform: none;
}
.osk-nf-fusion-wrap .newsfeed-video-item,
.osk-nf-fusion-wrap .newsfeed-shot-item {
	margin-bottom: 10px !important;
	padding: 12px 14px;
	border-radius: 14px;
	border: 1px solid var(--osk-nf-flat-border);
	background: var(--osk-nf-flat-surface);
}
.osk-nf-fusion-wrap .nf-post-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

/* Compose sticky — trasparente, solo la barra ha stile */
.osk-nf-compose-sticky {
	position: sticky;
	top: var(--osk-page-top, 78px);
	z-index: 24;
	margin: 0 0 12px;
	padding: 6px 0 8px;
	background: transparent;
	border: 0;
	box-shadow: none;
}
/* Newsfeed: in scroll il composer resta sotto la navbar senza gap page-top */
body.osk-topnav-layout[data-osk-page="newsfeed"] .osk-nf-compose-sticky {
	top: var(--osk-nav-h, 64px);
	padding-top: 2px;
	padding-bottom: 6px;
	margin-bottom: 10px;
}
@media (max-width: 991.98px) {
	body.osk-topnav-layout[data-osk-page="newsfeed"] .osk-nf-compose-sticky {
		top: var(--osk-nav-h, 54px);
	}
}
.osk-nf-compose-sticky .osk-nf-write-zone {
	margin-bottom: 0;
}
.osk-nf-compose-sticky .osk-nf-compose-bar {
	margin-bottom: 0;
}

/* Barra mobile canali iscritti */
.osk-nf-fusion-wrap .osk-nf-subs-rail {
	margin-bottom: 4px;
	padding: 10px 2px 12px;
	border-bottom: 0;
}
.osk-nf-fusion-wrap .osk-nf-subs-ring {
	min-width: 72px;
}
.osk-nf-fusion-wrap .osk-nf-subs-ring__avatar-wrap,
.osk-nf-fusion-wrap .osk-nf-subs-ring__avatar {
	width: 56px;
	height: 56px;
}
.osk-nf-fusion-wrap .osk-nf-subs-ring__name {
	max-width: 72px;
	font-size: .72rem;
}

/* Scoperta inline / esplora — flat */
.osk-nf-fusion-wrap .osk-nf-discover-inline {
	background: transparent;
	border: 0;
	box-shadow: none;
}

/* Mobile segment — flat */
.osk-nf-mobile-seg-wrap .osk-nf-seg-flat__track {
	border-color: var(--osk-nf-flat-border, rgba(255, 255, 255, .08));
}
.osk-nf-control-box--flat {
	border-color: var(--osk-nf-flat-border, rgba(255, 255, 255, .07));
}

/* Commenti — distraction free flat */
.osk-nf-fusion-wrap .osk-nf-comments-panel {
	background: var(--osk-nf-flat-surface-2);
	border: 1px solid var(--osk-nf-flat-border);
	border-radius: 12px;
	box-shadow: none;
	padding: 12px;
}
.osk-nf-fusion-wrap .osk-nf-comments-panel__head {
	border-bottom: 1px solid var(--osk-nf-flat-border);
	padding-bottom: 8px;
	margin-bottom: 10px;
}
.osk-nf-fusion-wrap .osk-nf-comments-panel__count {
	background: rgba(230, 0, 0, .12);
	border: 1px solid rgba(230, 0, 0, .22);
	box-shadow: none;
}
.osk-nf-fusion-wrap .osk-nf-comment-input {
	background: var(--osk-nf-flat-bg) !important;
	border: 1px solid var(--osk-nf-flat-border) !important;
	border-radius: 12px !important;
	box-shadow: none !important;
}
.osk-nf-fusion-wrap .osk-nf-comment-input:focus {
	border-color: rgba(230, 0, 0, .35) !important;
	box-shadow: none !important;
}
.osk-nf-fusion-wrap .osk-nf-comments-list .comment-item,
.osk-nf-fusion-wrap .nf-shell-wrap .osk-nf-comments-panel .comment-item {
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--osk-nf-flat-border);
	border-radius: 0;
	box-shadow: none;
	padding: 10px 0;
	margin: 0;
}
.osk-nf-fusion-wrap .osk-nf-comments-list .comment-item:last-child {
	border-bottom: 0;
}
.osk-nf-fusion-wrap .osk-nf-comment-btn {
	border-radius: 10px;
	border: 1px solid var(--osk-nf-flat-border);
	background: var(--osk-nf-flat-surface);
	box-shadow: none;
}
.osk-nf-fusion-wrap .osk-nf-comment-btn--primary {
	background: var(--osk-nf-flat-accent);
	border-color: transparent;
}

/* Composer adattivo — context strip */
.osk-composer__context {
	padding: 10px 18px;
	border-bottom: 1px solid rgba(255, 255, 255, .06);
	background: var(--osk-c-surface-2, #18181c);
}
.osk-composer__context-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}
.osk-composer__context-label {
	font-size: .68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: rgba(255, 255, 255, .42);
}
.osk-composer__context-dest {
	font-size: .82rem;
	font-weight: 700;
	color: rgba(255, 255, 255, .88);
}
.osk-composer__context-topic {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: .75rem;
	font-weight: 800;
	color: #fff;
	background: rgba(230, 0, 0, .16);
	border: 1px solid rgba(230, 0, 0, .3);
}
.osk-composer__context-hint {
	margin: 6px 0 0;
	font-size: .74rem;
	color: rgba(255, 255, 255, .45);
	line-height: 1.4;
}

/* Composer flat premium — meno distrazioni in contesto topic */
.osk-composer--ctx-topic .osk-composer__panel {
	box-shadow: none;
	border: 1px solid rgba(255, 255, 255, .08);
	background: var(--osk-c-surface, #111114);
}
.osk-composer--ctx-topic .osk-composer__header--flat {
	background: var(--osk-c-surface);
	border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.osk-composer--ctx-topic .osk-composer__footer--flat {
	border-top: 1px solid rgba(255, 255, 255, .06);
	background: var(--osk-c-surface);
}
.osk-composer--ctx-topic .osk-composer__editor--flat textarea {
	background: transparent;
	border: 0;
	box-shadow: none;
	min-height: 140px;
}
.osk-composer--ctx-following .osk-composer__context {
	background: rgba(255, 255, 255, .02);
}

/* Composer panel — flat globale */
.osk-composer__panel {
	background: var(--osk-c-surface) !important;
	box-shadow: none !important;
	border: 1px solid rgba(255, 255, 255, .08) !important;
}
.osk-composer__header--flat {
	background: var(--osk-c-surface) !important;
	border-bottom: 1px solid rgba(255, 255, 255, .06) !important;
}
.osk-composer__header--flat {
	background-image: none !important;
}
.osk-composer__mode-bar {
	background: var(--osk-c-surface-2) !important;
	border-bottom: 1px solid rgba(255, 255, 255, .06) !important;
}
.osk-composer__footer--flat {
	background: var(--osk-c-surface) !important;
	border-top: 1px solid rgba(255, 255, 255, .06) !important;
	box-shadow: none !important;
}

body.osk-nf-panel-topic .osk-nf-compose-sticky .osk-nf-compose-bar {
	border-color: rgba(230, 0, 0, .18);
	background: var(--osk-nf-flat-surface-2);
}

/* Compose bar — zona scrittura */
.osk-nf-fusion-wrap .osk-nf-compose-bar {
	border-radius: 14px;
	background: var(--osk-nf-flat-surface);
	border: 1px solid var(--osk-nf-flat-border);
	box-shadow: none;
}
.osk-nf-fusion-wrap .osk-nf-compose-bar:hover {
	border-color: rgba(255, 255, 255, .12);
	background: var(--osk-nf-flat-surface-2);
	box-shadow: none;
}
.osk-nf-write-surface {
	background: var(--osk-nf-flat-surface, #121214);
	border: 1px solid var(--osk-nf-flat-border, rgba(255, 255, 255, .07));
	border-radius: 14px;
	box-shadow: none;
}
.osk-nf-write-input {
	display: block;
	width: 100%;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid var(--osk-nf-flat-border, rgba(255, 255, 255, .07));
	background: var(--osk-nf-flat-bg, #0c0c0e);
	color: var(--osk-nf-flat-text, rgba(255, 255, 255, .92));
	font: inherit;
	line-height: 1.45;
	box-shadow: none;
	outline: none;
	transition: border-color .15s ease, background .15s ease;
}
.osk-nf-write-input::placeholder {
	color: rgba(255, 255, 255, .32);
}
.osk-nf-write-input:focus {
	border-color: rgba(255, 255, 255, .16);
	background: #0a0a0c;
	box-shadow: none;
}
.osk-nf-write-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 16px;
	border-radius: 999px;
	font-size: .8rem;
	font-weight: 800;
	line-height: 1.2;
	border: 1px solid transparent;
	cursor: pointer;
	font-family: inherit;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.osk-nf-write-btn--ghost {
	background: transparent;
	border-color: var(--osk-nf-flat-border-strong, rgba(255, 255, 255, .11));
	color: rgba(255, 255, 255, .72);
}
.osk-nf-write-btn--ghost:hover {
	color: #fff;
	border-color: rgba(255, 255, 255, .18);
	background: rgba(255, 255, 255, .04);
}
.osk-nf-write-btn--primary {
	background: var(--osk-nf-flat-accent, #e60000);
	border-color: transparent;
	color: #fff;
}
.osk-nf-write-btn--primary:hover {
	filter: brightness(1.06);
}

.osk-nf-fusion-wrap .osk-nf-compose-bar__hint {
	color: rgba(255, 255, 255, .42);
	text-transform: none;
	letter-spacing: 0;
	font-weight: 600;
	font-size: .68rem;
}
.osk-nf-fusion-wrap .osk-nf-compose-bar__badge {
	background: rgba(255, 255, 255, .06);
	border-color: var(--osk-nf-flat-border);
	color: rgba(255, 255, 255, .78);
}

/* Info argomenti / feed — popover senza sfondo, sopra composer */
.osk-nf-compose-sticky__tools {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	min-height: 32px;
	margin: 0 0 6px;
	padding: 0 2px;
}
.osk-nf-feed-info {
	position: relative;
	flex: 0 0 auto;
	z-index: 12;
}
.osk-nf-feed-info__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .38);
	background: transparent;
	color: rgba(255, 255, 255, .78);
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.osk-nf-feed-info__btn:hover,
.osk-nf-feed-info__btn[aria-expanded="true"] {
	color: #fff;
	border-color: rgba(255, 255, 255, .62);
	transform: translateY(-1px);
}
.osk-nf-feed-info__pop {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 40;
	width: min(340px, calc(100vw - 28px));
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	color: rgba(255, 255, 255, .76);
	font-size: .84rem;
	line-height: 1.55;
	text-align: left;
}
.osk-nf-feed-info__pop.d-none { display: none !important; }
.osk-nf-feed-info__lead {
	margin: 0 0 8px;
	color: rgba(255, 255, 255, .82);
}
.osk-nf-feed-info__list {
	margin: 0 0 12px;
	padding-left: 1.1rem;
}
.osk-nf-feed-info__list li { margin-bottom: 4px; }
.osk-nf-feed-info__taxonomy { display: grid; gap: 10px; }
.osk-nf-feed-info__row p {
	margin: 3px 0 0;
	font-size: .82rem;
	color: rgba(255, 255, 255, .68);
}
.osk-nf-feed-info__label {
	display: inline-block;
	font-size: .68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: rgba(255, 255, 255, .48);
}
.osk-nf-feed-info__pop code {
	padding: 1px 5px;
	border-radius: 4px;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, .14);
	font-size: .82em;
}
.osk-nf-feed-info__pop a,
.osk-nf-feed-info__link {
	color: rgba(255, 255, 255, .9);
	text-decoration: underline;
	text-underline-offset: 2px;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	cursor: pointer;
}
.osk-nf-feed-info__pop a:hover,
.osk-nf-feed-info__link:hover {
	color: #fff;
}

/* Riduzione rumore visivo center head */
.osk-nf-fusion-wrap .nf-center-head {
	min-height: 0;
	padding: 0;
	margin: 0;
}

@media (max-width: 991.98px) {
	.osk-nf-fusion-wrap .nf-sidebar-left,
	.osk-nf-fusion-wrap .nf-sidebar-right {
		display: none;
	}
	.osk-nf-fusion-wrap .newsfeed-post-item.osk-nf-post-card {
		border-radius: 12px !important;
	}
}

/* Senza tema canale viewer: canvas neutro */
body.osk-topnav-layout[data-osk-page="newsfeed"]:not(.osk-viewer-ch-theme-on) #container_content,
body.osk-topnav-layout[data-osk-page="newsfeed"]:not(.osk-viewer-ch-theme-on) .nf-shell-wrap.osk-nf-fusion-wrap {
	background: var(--body-bg, var(--osk-nf-flat-bg, #0c0c0e));
}
/* Overlay tema newsfeed utente disattivato — usa sfondo tema canale sul body */
body.osk-topnav-layout[data-osk-page="newsfeed"] .nf-shell-wrap[class*="nf-theme-"]::before {
	display: none !important;
}
