/**
 * Footer fisso espandibile verso l'alto (z-index sopra postshow per info legali).
 * Stessa tecnica CSS della tendina postshow: transizione e pannello.
 *
 * @package blastertheme
 */

:root {
	--bt-footer-duration: 0.38s;
	--bt-footer-easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
	--bt-footer-bar-height: 40px; /* stessa altezza della top bar header */
}

/* Spazio sotto il contenuto per non essere coperto dalla barra fissa */
.bt-main { padding-bottom: var(--bt-footer-bar-height); }

/* Footer fisso in basso, sopra postshow (100000) e header (100001) */
.bt-footer {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 100002;
	background: #16213e;
	color: #fff;
	margin: 0;
}

/* Barra inferiore sempre visibile (stessa altezza header) */
.bt-footer__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 0 16px;
	height: var(--bt-footer-bar-height);
	min-height: var(--bt-footer-bar-height);
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	background: #16213e;
	font-size: 0.8rem;
	line-height: 1.2;
}

/* Pulsante hamburger (3 righette) - espande verso l'alto */
.bt-footer__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0 0 0 -8px;
	border: none;
	background: transparent;
	color: inherit;
	cursor: pointer;
	border-radius: 6px;
	transition: background 0.2s ease;
	flex-shrink: 0;
}
.bt-footer__toggle:hover,
.bt-footer__toggle:focus {
	background: rgba(255, 255, 255, 0.1);
}
.bt-footer__toggle svg {
	width: 20px;
	height: 20px;
}

/* Copyright / contenuto riga inferiore */
.bt-footer__copy {
	flex: 1;
	text-align: right;
	font-size: 0.85rem;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 0 1em;
}
.bt-footer__copy a { color: inherit; text-decoration: underline; }
.bt-footer__copy .bt-footer-nav { display: inline; }
.bt-footer__copy .bt-footer-nav ul { list-style: none; margin: 0; padding: 0; display: inline-flex; gap: 1em; }
.bt-footer__copy .bt-footer-nav a { text-decoration: none; }
.bt-footer__copy .bt-footer-nav a:hover { text-decoration: underline; }

/* Pannello espandibile verso l'alto (widget) - come postshow ma slide up */
.bt-footer__panel {
	position: absolute;
	bottom: 100%;
	left: 0;
	right: 0;
	max-height: 70vh;
	overflow-y: auto;
	background: #16213e;
	box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
	transform: translateY(100%);
	transition: transform var(--bt-footer-duration) var(--bt-footer-easing);
	visibility: hidden;
}
.bt-footer.is-open .bt-footer__panel {
	transform: translateY(0);
	visibility: visible;
}

/* Griglia 4 widget nella riga superiore */
.bt-footer__widgets {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	padding: 24px;
	max-width: 1200px;
	margin: 0 auto;
}
.bt-footer__widgets .widget {
	margin: 0;
}
.bt-footer__widgets .widget-title {
	margin: 0 0 0.75em;
	font-size: 0.95rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.95);
}
.bt-footer__widgets .widget ul { list-style: none; margin: 0; padding: 0; }
.bt-footer__widgets .widget li { margin-bottom: 0.5em; }
.bt-footer__widgets .widget a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.bt-footer__widgets .widget a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 768px) {
	.bt-footer__widgets {
		grid-template-columns: 1fr 1fr;
		padding: 16px;
	}
}
@media (max-width: 480px) {
	.bt-footer__widgets {
		grid-template-columns: 1fr;
	}
}
