/* ==========================================================================
   Legal Pages - Connect Your Life
   Stili per Privacy Policy, Cookie Policy, Termini e Condizioni
   ========================================================================== */

/* Page wrapper — full-height dark layout */
body:not(:has(.cyl-site-wrap)) {
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
}

body:not(:has(.cyl-site-wrap)) .wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100dvh;
}

body:not(:has(.cyl-site-wrap)) .wp-site-blocks > main {
	flex: 1;
}

/* Content area — glass card container */
body:not(:has(.cyl-site-wrap)) main .wp-block-group {
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
}

body:not(:has(.cyl-site-wrap)) main > .wp-block-group > .wp-block-group {
	background: rgba(53, 56, 64, 0.5);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 16px;
	padding: 3rem 3.5rem;
	margin-top: 2rem;
	margin-bottom: 3rem;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Page title */
body:not(:has(.cyl-site-wrap)) .wp-block-post-title {
	font-family: var(--wp--preset--font-family--oswald, 'Oswald', sans-serif);
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-align: center;
	background: linear-gradient(135deg, #00d4ff 0%, #7c4dff 50%, #00e676 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin-bottom: 0;
	padding-top: 1rem;
}

/* Accent line under title (via pseudo-element on post-content) */
body:not(:has(.cyl-site-wrap)) .wp-block-post-content::before {
	content: '';
	display: block;
	width: 60px;
	height: 3px;
	background: var(--wp--preset--color--accent-cyan, #00d4ff);
	border-radius: 2px;
	margin: 1.5rem auto 2rem;
}

/* Section headings (h2) */
body:not(:has(.cyl-site-wrap)) .wp-block-post-content h2 {
	font-size: clamp(1.1rem, 2.5vw, 1.4rem);
	color: var(--wp--preset--color--accent-cyan, #00d4ff);
	margin-top: 2.5rem;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}

/* First h2 — no extra top margin */
body:not(:has(.cyl-site-wrap)) .wp-block-post-content h2:first-child {
	margin-top: 0;
}

/* Paragraphs */
body:not(:has(.cyl-site-wrap)) .wp-block-post-content p {
	color: var(--wp--preset--color--muted, #9e9e9e);
	line-height: 1.7;
	font-size: 0.9375rem;
}

/* Links in content */
body:not(:has(.cyl-site-wrap)) .wp-block-post-content a {
	color: var(--wp--preset--color--accent-cyan, #00d4ff);
	text-decoration: none;
	border-bottom: 1px solid rgba(0, 212, 255, 0.3);
	transition: border-color 0.3s ease, color 0.3s ease;
}

body:not(:has(.cyl-site-wrap)) .wp-block-post-content a:hover {
	color: var(--wp--preset--color--accent-purple, #7c4dff);
	border-bottom-color: var(--wp--preset--color--accent-purple, #7c4dff);
}

/* Strong / bold */
body:not(:has(.cyl-site-wrap)) .wp-block-post-content strong {
	color: var(--wp--preset--color--contrast, #ffffff);
	font-weight: 700;
}

/* Lists */
body:not(:has(.cyl-site-wrap)) .wp-block-post-content ul {
	list-style: none;
	padding-left: 0;
}

body:not(:has(.cyl-site-wrap)) .wp-block-post-content ul li {
	position: relative;
	padding-left: 1.5rem;
	margin-bottom: 0.6rem;
	color: var(--wp--preset--color--muted, #9e9e9e);
	font-size: 0.9375rem;
	line-height: 1.6;
}

body:not(:has(.cyl-site-wrap)) .wp-block-post-content ul li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-cyan, #00d4ff);
}

/* Code / inline code */
body:not(:has(.cyl-site-wrap)) .wp-block-post-content code {
	background: rgba(0, 230, 118, 0.08);
	color: var(--wp--preset--color--accent-green, #00e676);
	padding: 0.15em 0.45em;
	border-radius: 4px;
	font-size: 0.85em;
	font-family: 'Courier New', monospace;
}

/* Tables (Cookie Policy) */
body:not(:has(.cyl-site-wrap)) .wp-block-table {
	margin: 1.5rem 0;
	overflow-x: auto;
}

body:not(:has(.cyl-site-wrap)) .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.8125rem;
}

body:not(:has(.cyl-site-wrap)) .wp-block-table thead th {
	font-family: var(--wp--preset--font-family--oswald, 'Oswald', sans-serif);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--accent-cyan, #00d4ff);
	background: rgba(0, 212, 255, 0.06);
	padding: 0.75rem 1rem;
	text-align: left;
	border-bottom: 2px solid rgba(0, 212, 255, 0.2);
}

body:not(:has(.cyl-site-wrap)) .wp-block-table tbody td {
	padding: 0.75rem 1rem;
	color: var(--wp--preset--color--muted, #9e9e9e);
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
	vertical-align: top;
}

body:not(:has(.cyl-site-wrap)) .wp-block-table tbody tr:hover td {
	background: rgba(255, 255, 255, 0.02);
}

body:not(:has(.cyl-site-wrap)) .wp-block-table tbody td:first-child {
	font-family: 'Courier New', monospace;
	color: var(--wp--preset--color--accent-green, #00e676);
	font-size: 0.8em;
}

/* Back to home link */
.cyl-legal-back {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--wp--preset--font-family--oswald, 'Oswald', sans-serif);
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--wp--preset--color--muted, #9e9e9e);
	text-decoration: none;
	transition: color 0.3s ease;
	margin-bottom: 1rem;
}

.cyl-legal-back:hover {
	color: var(--wp--preset--color--accent-cyan, #00d4ff);
}

/* ==========================================================================
   Language Switcher (duplicato da panel-navigation per pagine interne)
   ========================================================================== */

.cyl-lang-switcher {
	display: flex;
	align-items: center;
	gap: 0;
	margin-left: 1rem;
}

.cyl-lang-btn {
	background: none;
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: var(--wp--preset--color--muted, #9e9e9e);
	font-family: var(--wp--preset--font-family--oswald, 'Oswald', sans-serif);
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 0.3em 0.6em;
	cursor: pointer;
	transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.cyl-lang-btn:first-child {
	border-radius: 4px 0 0 4px;
	border-right: none;
}

.cyl-lang-btn:last-child {
	border-radius: 0 4px 4px 0;
}

.cyl-lang-btn--active {
	color: var(--wp--preset--color--base, #1a1c1e);
	background: var(--wp--preset--color--accent-cyan, #00d4ff);
	border-color: var(--wp--preset--color--accent-cyan, #00d4ff);
}

.cyl-lang-btn:not(.cyl-lang-btn--active):hover {
	color: var(--wp--preset--color--accent-cyan, #00d4ff);
	border-color: var(--wp--preset--color--accent-cyan, #00d4ff);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
	body:not(:has(.cyl-site-wrap)) main > .wp-block-group > .wp-block-group {
		padding: 2rem 1.5rem;
		margin-top: 1rem;
		margin-bottom: 2rem;
		border-radius: 12px;
	}

	body:not(:has(.cyl-site-wrap)) .wp-block-table table {
		font-size: 0.75rem;
	}

	body:not(:has(.cyl-site-wrap)) .wp-block-table thead th,
	body:not(:has(.cyl-site-wrap)) .wp-block-table tbody td {
		padding: 0.5rem 0.65rem;
	}
}

@media (max-width: 480px) {
	body:not(:has(.cyl-site-wrap)) main > .wp-block-group > .wp-block-group {
		padding: 1.5rem 1.25rem;
		border-radius: 8px;
	}

	body:not(:has(.cyl-site-wrap)) .wp-block-post-content h2 {
		font-size: 1rem;
	}
}
