/**
 * UI app-like — solo html.ci-pwa-standalone (PWA / icona home).
 * Safari e browser normali: invisibile.
 */

:root {
	--ci-pwa-bg: #0c0c0c;
	--ci-pwa-surface: #121212;
	--ci-pwa-border: rgba(255, 255, 255, 0.08);
	--ci-pwa-accent: #6710c2;
	--ci-pwa-accent-soft: rgba(103, 16, 194, 0.22);
	--ci-pwa-text: #ffffff;
	--ci-pwa-muted: rgba(255, 255, 255, 0.62);
	--ci-pwa-tabbar-h: 64px;
}

.ci-pwa-topbar,
.ci-pwa-tabbar {
	display: none;
}

html.ci-pwa-standalone {
	-webkit-text-size-adjust: 100%;
}

html.ci-pwa-standalone body {
	background: var(--ci-pwa-bg);
	color: var(--ci-pwa-text);
	padding-top: calc(56px + env(safe-area-inset-top, 0px));
	padding-bottom: calc(var(--ci-pwa-tabbar-h) + env(safe-area-inset-bottom, 0px));
}

html.ci-pwa-standalone .jws_header,
html.ci-pwa-standalone .elementor-location-header,
html.ci-pwa-standalone header.site-header,
html.ci-pwa-standalone .site-footer,
html.ci-pwa-standalone footer.site-footer,
html.ci-pwa-standalone .jws-footer,
html.ci-pwa-standalone .jws-toolbar-wap,
html.ci-pwa-standalone #install-bar,
html.ci-pwa-standalone .jws_back_to_top,
html.ci-pwa-standalone #back-to-top {
	display: none !important;
}

html.ci-pwa-standalone .ci-pwa-topbar,
html.ci-pwa-standalone .ci-pwa-tabbar {
	display: block;
}

html.ci-pwa-standalone .ci-pwa-tabbar {
	display: flex;
}

html.ci-pwa-standalone .ci-pwa-topbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 2147483000;
	padding-top: env(safe-area-inset-top, 0px);
	background: var(--ci-pwa-surface);
	border-bottom: 1px solid var(--ci-pwa-border);
}

html.ci-pwa-standalone .ci-pwa-topbar-inner {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr) auto;
	align-items: center;
	gap: 8px;
	min-height: 56px;
	padding: 8px 12px;
}

html.ci-pwa-standalone .ci-pwa-topbar-left,
html.ci-pwa-standalone .ci-pwa-topbar-right {
	display: flex;
	align-items: center;
	min-width: 0;
}

html.ci-pwa-standalone .ci-pwa-topbar-right {
	justify-content: flex-end;
}

html.ci-pwa-standalone .ci-pwa-topbar-center {
	display: flex;
	justify-content: center;
	min-width: 0;
}

html.ci-pwa-standalone .ci-pwa-topbar-logo-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: min(62vw, 200px);
	line-height: 0;
}

html.ci-pwa-standalone .ci-pwa-topbar-logo-main {
	display: block;
	height: 36px;
	width: auto;
	max-width: min(62vw, 200px);
	object-fit: contain;
	object-position: center;
}

html.ci-pwa-standalone .ci-pwa-topbar-menu {
	border: 0;
	background: transparent;
	color: var(--ci-pwa-text);
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

html.ci-pwa-standalone .ci-pwa-topbar-menu-icon {
	width: 22px;
	height: 16px;
	background: linear-gradient(
		to bottom,
		#fff 0 2px,
		transparent 2px 7px,
		#fff 7px 9px,
		transparent 9px 14px,
		#fff 14px 16px
	);
}

html.ci-pwa-standalone .ci-pwa-topbar-icons {
	display: flex;
	align-items: center;
	gap: 2px;
}

html.ci-pwa-standalone .ci-pwa-topbar-icon-slot {
	display: inline-flex;
	align-items: center;
}

html.ci-pwa-standalone .ci-pwa-topbar-icon-slot .nc-bell,
html.ci-pwa-standalone .ci-pwa-topbar-icon-slot .ci-support-btn {
	width: 40px;
	height: 40px;
	min-width: 40px;
	padding: 0;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

html.ci-pwa-standalone .ci-pwa-topbar-icon-slot .nc-bell {
	border: 0;
	box-shadow: none;
	background: transparent;
}

html.ci-pwa-standalone .ci-pwa-topbar-icon-slot .nc-bell-icon,
html.ci-pwa-standalone .ci-pwa-topbar-icon-slot .nc-bell-glyph {
	width: 28px;
	height: 28px;
}

html.ci-pwa-standalone .ci-pwa-topbar-icon-slot .ci-support-btn svg {
	width: 28px !important;
	height: 28px !important;
	display: block;
}

html.ci-pwa-standalone .elementor-location-header .nc-header-injected-icons,
html.ci-pwa-standalone .jws_header .nc-header-injected-icons,
html.ci-pwa-standalone header.site-header .nc-header-injected-icons {
	display: none !important;
}

html.ci-pwa-standalone .ci-pwa-topbar-icon-slot #notifiche-campana .nc-panel {
	position: fixed;
	top: calc(56px + env(safe-area-inset-top, 0px) + 8px);
	right: 12px;
	left: auto;
	z-index: 2147483300;
}

html.ci-pwa-standalone .jws-offcanvas-overlay,
html.ci-pwa-standalone .uaoffcanvas-a9f3708 .jws-offcanvas-overlay {
	background: rgba(0, 0, 0, 0.42) !important;
	z-index: 2147483550 !important;
}

html.ci-pwa-standalone .jws-offcanvas-show .jws-offcanvas-overlay {
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

html.ci-pwa-standalone .jws-offcanvas.jws-offcanvas-show {
	z-index: 2147483650 !important;
	pointer-events: none !important;
}

html.ci-pwa-standalone .jws-offcanvas .jws-offcanvas-content-data {
	width: min(88vw, 320px) !important;
	min-height: 100dvh !important;
	max-width: 88vw !important;
	background: #12121a !important;
	color: #ffffff !important;
	padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 24px !important;
	box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
	z-index: 2147483650 !important;
	pointer-events: auto !important;
	transition: transform 0.35s ease, visibility 0.35s ease, opacity 0.35s ease;
}

html.ci-pwa-standalone .jws-offcanvas.position-at-left .jws-offcanvas-content-data {
	left: 0 !important;
	transform: translateX(-100%) !important;
	-webkit-transform: translateX(-100%) !important;
}

html.ci-pwa-standalone .jws-offcanvas.jws-offcanvas-show .jws-offcanvas-content-data {
	transform: translateX(0) !important;
	-webkit-transform: translateX(0) !important;
	visibility: visible !important;
	opacity: 1 !important;
}

html.ci-pwa-standalone .jws-offcanvas-overlay {
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

html.ci-pwa-standalone .jws-offcanvas .jws-offcanvas-content-data a,
html.ci-pwa-standalone .jws-offcanvas .jws-offcanvas-menu li a,
html.ci-pwa-standalone .jws-offcanvas .jws-offcanvas-menu li a span {
	color: #ffffff !important;
}

html.ci-pwa-standalone .jws-offcanvas .jws-offcanvas-menu > li > a {
	font-size: 16px;
	font-weight: 600;
	padding: 12px 0 !important;
}

html.ci-pwa-standalone .jws-offcanvas .jws-offcanvas-menu .sub-menu {
	display: none;
	margin: 0 0 8px;
	padding: 0 0 0 12px;
	border-left: 1px solid rgba(255, 255, 255, 0.12);
}

html.ci-pwa-standalone .jws-offcanvas .menu-item-has-children.ci-pwa-submenu-open > .sub-menu {
	display: block;
}

html.ci-pwa-standalone .jws-offcanvas .jws-offcanvas-menu .sub-menu a {
	font-size: 15px;
	font-weight: 500;
	opacity: 0.92;
	padding: 10px 0 !important;
}

html.ci-pwa-standalone .jws-offcanvas .menu-item-has-children > a .jws-icon-caret-down {
	transition: transform 0.2s ease;
}

html.ci-pwa-standalone .jws-offcanvas .menu-item-has-children.ci-pwa-submenu-open > a .jws-icon-caret-down {
	transform: rotate(180deg);
}

html.ci-pwa-standalone #pwa-notification-prompt {
	z-index: 2147483800 !important;
	top: calc(16px + env(safe-area-inset-top, 0px)) !important;
	left: 50% !important;
	transform: translateX(-50%) !important;
	width: min(92vw, 450px) !important;
	max-width: 450px !important;
	pointer-events: auto !important;
}

html.ci-pwa-standalone body.ci-pwa-menu-open {
	overflow: hidden;
}

html.ci-pwa-standalone .ci-pwa-topbar-kicker {
	display: block;
	font-size: 11px;
	line-height: 1.2;
	color: var(--ci-pwa-muted);
}

html.ci-pwa-standalone .ci-pwa-topbar-title {
	display: block;
	font-size: 16px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--ci-pwa-text);
	max-width: 58vw;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

html.ci-pwa-standalone .ci-pwa-topbar-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

html.ci-pwa-standalone .ci-pwa-topbar-login {
	border: 1px solid var(--ci-pwa-accent);
	background: var(--ci-pwa-accent-soft);
	color: var(--ci-pwa-text);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	padding: 8px 12px;
}

html.ci-pwa-standalone .ci-pwa-topbar-badge {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #3ecf8e;
	border: 2px solid var(--ci-pwa-surface);
}

html.ci-pwa-standalone .ci-pwa-topbar-logo {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	object-fit: cover;
}

html.ci-pwa-standalone .ci-pwa-tabbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2147483000;
	align-items: stretch;
	justify-content: space-around;
	min-height: var(--ci-pwa-tabbar-h);
	padding: 6px 8px calc(10px + env(safe-area-inset-bottom, 0px));
	background: rgba(18, 18, 18, 0.98);
	border-top: 1px solid var(--ci-pwa-border);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

html.ci-pwa-standalone .ci-pwa-tabbar-item {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	text-decoration: none;
	color: var(--ci-pwa-muted);
	font-size: 10px;
	font-weight: 600;
	line-height: 1.1;
	padding: 6px 2px;
	border-radius: 12px;
	min-width: 0;
	min-height: 52px;
}

html.ci-pwa-standalone .ci-pwa-tabbar-item.is-active {
	color: var(--ci-pwa-text);
	background: var(--ci-pwa-accent-soft);
}

html.ci-pwa-standalone .ci-pwa-tabbar-icon {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
	background-color: currentColor;
	opacity: 0.9;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: 22px 22px;
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: 22px 22px;
}

html.ci-pwa-standalone .ci-pwa-tabbar-label {
	display: block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-align: center;
	line-height: 1;
}

html.ci-pwa-standalone .ci-pwa-tabbar-item.is-active .ci-pwa-tabbar-icon {
	opacity: 1;
}

html.ci-pwa-standalone .ci-pwa-tabbar-icon-home {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 10.5 12 4l8 6.5V20a1 1 0 0 1-1 1h-5v-6h-4v6H5a1 1 0 0 1-1-1v-9.5Z' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 10.5 12 4l8 6.5V20a1 1 0 0 1-1 1h-5v-6h-4v6H5a1 1 0 0 1-1-1v-9.5Z' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E");
}

html.ci-pwa-standalone .ci-pwa-tabbar-icon-episodes {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' stroke='black' stroke-width='1.8'/%3E%3Cpath d='m10 9.5 5 2.5-5 2.5v-5Z' fill='black'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' stroke='black' stroke-width='1.8'/%3E%3Cpath d='m10 9.5 5 2.5-5 2.5v-5Z' fill='black'/%3E%3C/svg%3E");
}

html.ci-pwa-standalone .ci-pwa-tabbar-item--avatar {
	border: 0;
	background: transparent;
	cursor: pointer;
	min-height: 52px;
	padding-top: 4px;
	padding-bottom: 2px;
}

html.ci-pwa-standalone .ci-pwa-tabbar-avatar {
	position: relative;
	display: inline-flex;
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	padding: 2px;
	border-radius: 50%;
	background: linear-gradient(90deg, rgba(36, 2, 89, 1) 0%, rgba(92, 9, 121, 1) 35%, rgba(36, 210, 245, 1) 100%);
}

html.ci-pwa-standalone .ci-pwa-tabbar-avatar::after {
	content: "";
	position: absolute;
	right: 1px;
	bottom: 1px;
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: #22c55e;
	border: 2px solid #121212;
	box-shadow: 0 0 8px rgba(34, 197, 94, 0.45);
	pointer-events: none;
}

html.ci-pwa-standalone .ci-pwa-tabbar-avatar img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

html.ci-pwa-standalone .ci-pwa-tabbar-item--avatar.is-active .ci-pwa-tabbar-avatar {
	box-shadow: 0 0 0 2px var(--ci-pwa-accent-soft);
}

html.ci-pwa-standalone .ci-pwa-account-sheet {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 2147483250;
	background: rgba(0, 0, 0, 0.72);
	padding: 16px;
	align-items: flex-end;
}

html.ci-pwa-standalone .ci-pwa-account-sheet:not([hidden]) {
	display: flex;
}

html.ci-pwa-standalone .ci-pwa-account-sheet-panel {
	width: 100%;
	max-height: min(72vh, 520px);
	overflow: auto;
	border-radius: 18px 18px 0 0;
	background: #121212;
	border: 1px solid var(--ci-pwa-border);
	padding: 16px;
	margin-bottom: calc(var(--ci-pwa-tabbar-h) + env(safe-area-inset-bottom, 0px));
}

html.ci-pwa-standalone .ci-pwa-account-sheet-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

html.ci-pwa-standalone .ci-pwa-account-sheet-user {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

html.ci-pwa-standalone .ci-pwa-account-sheet-user strong {
	font-size: 16px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

html.ci-pwa-standalone .ci-pwa-account-sheet-close {
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	padding: 0 4px;
}

html.ci-pwa-standalone .ci-pwa-account-sheet-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

html.ci-pwa-standalone .ci-pwa-account-sheet-menu li a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 8px;
	color: #fff;
	text-decoration: none;
	border-bottom: 1px solid var(--ci-pwa-border);
}

html.ci-pwa-standalone .ci-pwa-tabbar-icon-search {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='6' stroke='black' stroke-width='1.8'/%3E%3Cpath d='m16.5 16.5 4 4' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='6' stroke='black' stroke-width='1.8'/%3E%3Cpath d='m16.5 16.5 4 4' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

html.ci-pwa-standalone .ci-pwa-tabbar-icon-pulse {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 12h3l2-6 4 12 2-6h5' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 12h3l2-6 4 12 2-6h5' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html.ci-pwa-standalone .ci-pwa-tabbar-icon-profile {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='8' r='3.5' stroke='black' stroke-width='1.8'/%3E%3Cpath d='M5 20c1.8-3.5 4.6-5 7-5s5.2 1.5 7 5' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='8' r='3.5' stroke='black' stroke-width='1.8'/%3E%3Cpath d='M5 20c1.8-3.5 4.6-5 7-5s5.2 1.5 7 5' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

html.ci-pwa-standalone body.ci-pulse-standalone-page {
	padding-top: 0;
}

html.ci-pwa-standalone body.ci-pulse-standalone-page .ci-pwa-topbar {
	display: none;
}

html.ci-pwa-standalone .jws-form-login-popup {
	z-index: 2147483600;
}

html.ci-pwa-standalone.home body {
	padding-top: calc(56px + env(safe-area-inset-top, 0px));
}

html.ci-pwa-standalone .ci-pwa-search-panel {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 2147483200;
	background: rgba(0, 0, 0, 0.72);
	padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px 16px;
}

html.ci-pwa-standalone .ci-pwa-search-panel:not([hidden]) {
	display: block;
}

html.ci-pwa-standalone .ci-pwa-search-panel form {
	display: flex;
	gap: 8px;
}

html.ci-pwa-standalone .ci-pwa-search-panel input {
	flex: 1;
	border: 1px solid var(--ci-pwa-border);
	background: var(--ci-pwa-surface);
	color: var(--ci-pwa-text);
	border-radius: 12px;
	padding: 14px 16px;
	font-size: 16px;
}

html.ci-pwa-standalone .ci-pwa-search-panel button {
	border: 0;
	border-radius: 12px;
	background: var(--ci-pwa-accent);
	color: #fff;
	padding: 0 16px;
	font-weight: 700;
}

html.ci-pwa-standalone.ci-pwa-navigating .ci-pwa-tabbar {
	opacity: 0.72;
	pointer-events: none;
}

html.ci-pwa-standalone.ci-pwa-navigating::before {
	content: '';
	position: fixed;
	top: env(safe-area-inset-top, 0px);
	left: 0;
	right: 0;
	height: 2px;
	z-index: 2147483100;
	background: var(--ci-pwa-accent);
	transform-origin: left center;
	animation: ci-pwa-nav-progress 1.1s ease-in-out infinite;
}

@keyframes ci-pwa-nav-progress {
	0% {
		transform: scaleX(0.08);
		opacity: 0.55;
	}

	50% {
		transform: scaleX(0.72);
		opacity: 1;
	}

	100% {
		transform: scaleX(0.95);
		opacity: 0.75;
	}
}
