/**
 * Right bar: su mobile tendina espandibile.
 * z-index sotto postshow (articolo sempre sopra) e sotto footer.
 * Icone espandi/chiudi in basso nella strip.
 *
 * @package blastertheme
 */

@media (max-width: 992px) {
	/* Strip: sopra il pannello (z-index) così la X resta visibile quando espanso */
	.bt-rightbar__strip {
		position: relative;
		z-index: 100000;
		justify-content: flex-end;
		padding-bottom: 8px;
		min-height: 0;
		pointer-events: none;
	}
	.bt-rightbar__strip .bt-rightbar__toggle {
		pointer-events: auto;
	}
	.bt-rightbar__strip .bt-rightbar__open,
	.bt-rightbar__strip .bt-rightbar__close {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		width: 24px;
		height: 24px;
		padding: 0;
		border: none;
		background: rgba(0, 0, 0, 0.06);
		color: #333;
		cursor: pointer;
		border-radius: 8px;
		margin-top: 4px;
	}
	.bt-rightbar__strip .bt-rightbar__close { display: none !important; }
	.bt-rightbar.is-open .bt-rightbar__strip .bt-rightbar__open { display: none !important; }
	.bt-rightbar.is-open .bt-rightbar__strip .bt-rightbar__close { display: inline-flex !important; }

	/* Pannello = tendina: z-index sotto postshow (100000) così l'articolo resta sopra */
	.bt-rightbar__panel {
		display: block !important;
		position: fixed;
		top: var(--bt-header-height, 40px);
		right: 0;
		bottom: var(--bt-footer-bar-height, 40px);
		width: min(85vw, 320px);
		z-index: 99999;
		background: #fff;
		box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
		overflow-y: auto;
		transform: translateX(100%);
		transition: transform 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94);
		-webkit-overflow-scrolling: touch;
	}
	.bt-rightbar.is-open .bt-rightbar__panel {
		transform: translateX(0);
	}
	.bt-rightbar__content {
		padding: 16px;
	}
}
