/* =========================================================
   Booking Xonex — Mobile bottom navigation + tickets sheet
   Stile app: barra flottante + sheet pulito
   ========================================================= */

@media (min-width: 784px) {
	.bx-mobile-nav,
	.bx-mobile-sheet {
		display: none !important;
	}

	body.bx-has-mobile-nav {
		padding-bottom: 0 !important;
	}
}

@media (max-width: 783px) {
	body.bx-has-mobile-nav {
		padding-bottom: calc(88px + env(safe-area-inset-bottom, 0)) !important;
	}

	body.bx-has-mobile-nav.bx-pwa-standalone {
		padding-bottom: calc(82px + env(safe-area-inset-bottom, 0)) !important;
	}

	body.bx-mobile-sheet-open {
		overflow: hidden !important;
		touch-action: none;
	}

	/* Popup acquisto biglietti sopra la barra mobile */
	body.bx-modal-open .bx-mobile-nav {
		visibility: hidden !important;
		pointer-events: none !important;
	}

	body.bx-modal-open.bx-has-mobile-nav {
		padding-bottom: 0 !important;
	}

	/* ── Bottom bar flottante (stile app XONEX) ─────────────── */
	.bx-mobile-nav {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 2147482900;
		pointer-events: none;
		padding: 0 14px calc(10px + env(safe-area-inset-bottom, 0));
		background: transparent !important;
		border: none !important;
		box-shadow: none !important;
		transform: none !important;
		font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
		-webkit-font-smoothing: antialiased;
	}

	.bx-mobile-nav-shell {
		max-width: 480px;
		margin: 0 auto;
		pointer-events: auto;
		overflow: visible;
	}

	.bx-mobile-nav-pill {
		position: relative;
		display: grid;
		grid-template-columns: 1fr 64px 1fr;
		align-items: center;
		min-height: 54px;
		padding: 6px 10px 8px;
		border-radius: 999px;
		overflow: visible;
		background: #fff;
		border: none;
		box-shadow:
			0 8px 32px rgba(15, 23, 42, 0.12),
			0 2px 6px rgba(15, 23, 42, 0.06);
	}

	body.bx-theme-dark .bx-mobile-nav-pill {
		background: #fff;
		box-shadow:
			0 8px 32px rgba(0, 0, 0, 0.28),
			0 2px 6px rgba(0, 0, 0, 0.14);
	}

	html.bx-pwa-standalone .bx-mobile-nav-pill,
	body.bx-pwa-standalone .bx-mobile-nav-pill {
		background: #fff;
		box-shadow:
			0 10px 36px rgba(15, 23, 42, 0.14),
			0 2px 8px rgba(15, 23, 42, 0.07);
	}

	.bx-mobile-nav-side {
		display: flex;
		align-items: center;
		justify-content: space-around;
		gap: 0;
		min-height: 44px;
	}

	.bx-mobile-nav-center {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 64px;
		justify-self: center;
		position: relative;
		z-index: 3;
	}

	.bx-mobile-nav-tickets-wrap {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 64px;
		margin-top: -28px;
		margin-bottom: 0;
		text-decoration: none !important;
		color: inherit;
	}

	.bx-mobile-nav-tickets-link {
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	.bx-mobile-nav-tickets-btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: auto;
		height: auto;
		padding: 0;
		margin: 0;
		border: none !important;
		background: transparent !important;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
		touch-action: manipulation;
		box-shadow: none !important;
		flex-shrink: 0;
	}

	.bx-mobile-nav-tickets-fab-only {
		pointer-events: none;
	}

	.bx-mobile-nav-tickets-fab-label {
		display: block;
		font-size: 10px;
		font-weight: 700;
		line-height: 1;
		color: #fff;
		letter-spacing: 0;
		margin-top: 2px;
	}

	.bx-mobile-nav-tickets-wrap.is-active .bx-mobile-nav-tickets-fab {
		transform: scale(0.96);
		box-shadow:
			0 14px 36px rgba(37, 99, 235, 0.55),
			0 0 0 4px #fff;
	}

	.bx-mobile-nav-tickets-btn:active .bx-mobile-nav-tickets-fab {
		transform: scale(0.94);
	}

	.bx-mobile-nav-item {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 3px;
		min-width: 48px;
		max-width: 72px;
		padding: 2px 4px;
		background: transparent !important;
		border: none !important;
		color: #64748b;
		text-decoration: none !important;
		font-size: 10px;
		font-weight: 600;
		line-height: 1.15;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
		touch-action: manipulation;
		box-shadow: none !important;
	}

	.bx-mobile-nav-item:hover,
	.bx-mobile-nav-item:focus,
	.bx-mobile-nav-item:visited {
		color: #64748b;
		background: transparent !important;
		text-decoration: none !important;
	}

	body.bx-theme-dark .bx-mobile-nav-item {
		color: #64748b;
	}

	.bx-mobile-nav-item:active {
		opacity: 0.72;
		transform: scale(0.96);
	}

	.bx-mobile-nav-icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 26px;
		height: 26px;
		color: #2563eb;
		flex-shrink: 0;
	}

	.bx-mobile-nav-icon .bx-mobile-nav-svg {
		display: block;
		stroke: currentColor;
	}

	.bx-mobile-nav-icon[data-icon="home"]     { color: #2563eb; }
	.bx-mobile-nav-icon[data-icon="calendar"] { color: #8b5cf6; }
	.bx-mobile-nav-icon[data-icon="search"]   { color: #64748b; }
	.bx-mobile-nav-icon[data-icon="user"]     { color: #2563eb; }
	.bx-mobile-nav-icon[data-icon="map-pin"]  { color: #ef4444; }
	.bx-mobile-nav-icon[data-icon="info"]     { color: #0ea5e9; }
	.bx-mobile-nav-icon[data-icon="mail"]     { color: #f59e0b; }
	.bx-mobile-nav-icon[data-icon="star"]     { color: #f59e0b; }
	.bx-mobile-nav-icon[data-icon="settings"] { color: #64748b; }
	.bx-mobile-nav-icon[data-icon="grid"]     { color: #6366f1; }
	.bx-mobile-nav-icon[data-icon="heart"]    { color: #ef4444; }
	.bx-mobile-nav-icon[data-icon="phone"]    { color: #22c55e; }
	.bx-mobile-nav-icon[data-icon="menu"]     { color: #64748b; }
	.bx-mobile-nav-icon[data-icon="ticket"]   { color: #2563eb; }

	.bx-mobile-nav-label {
		max-width: 72px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		text-align: center;
		color: #64748b;
		font-weight: 600;
	}

	.bx-mobile-nav-tickets-fab {
		display: inline-flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2px;
		width: 62px;
		height: 62px;
		padding: 8px 6px 7px;
		border-radius: 50%;
		background: var(--bx-color-primary, #2563eb);
		color: #fff;
		box-shadow:
			0 10px 28px rgba(37, 99, 235, 0.5),
			0 4px 10px rgba(37, 99, 235, 0.3),
			0 0 0 4px #fff;
		transition: transform 0.15s ease, box-shadow 0.15s ease;
		flex-shrink: 0;
	}

	body.bx-theme-dark .bx-mobile-nav-tickets-fab,
	html.bx-pwa-standalone .bx-mobile-nav-tickets-fab {
		box-shadow:
			0 10px 28px rgba(37, 99, 235, 0.55),
			0 4px 10px rgba(37, 99, 235, 0.35),
			0 0 0 4px #fff;
	}

	.bx-mobile-nav-tickets-fab .bx-mobile-nav-svg {
		stroke: #fff;
		flex-shrink: 0;
	}

	.bx-mobile-nav-slots-4 .bx-mobile-nav-item {
		min-width: 44px;
		max-width: 64px;
		font-size: 9px;
	}

	.bx-mobile-nav-slots-4 .bx-mobile-nav-icon {
		width: 24px;
		height: 24px;
	}

	/* ── Bottom sheet ───────────────────────────────────────── */
	.bx-mobile-sheet {
		position: fixed;
		inset: 0;
		z-index: 2147482950;
		display: flex;
		align-items: flex-end;
		justify-content: center;
		padding: 0;
		margin: 0;
		background: transparent !important;
		border: none !important;
	}

	.bx-mobile-sheet[hidden] {
		display: none !important;
	}

	.bx-mobile-sheet-overlay {
		position: absolute;
		inset: 0;
		background: rgba(8, 12, 24, 0.62);
		backdrop-filter: blur(2px);
		-webkit-backdrop-filter: blur(2px);
		animation: bxMobileFadeIn 0.22s ease;
	}

	.bx-mobile-sheet-panel {
		position: relative;
		width: 100%;
		max-width: 560px;
		max-height: 88vh;
		max-height: 88dvh;
		margin: 0;
		background: #fff;
		border-radius: 28px 28px 0 0;
		box-shadow: 0 -20px 60px rgba(15, 23, 42, 0.22);
		display: flex;
		flex-direction: column;
		animation: bxMobileSlideUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
		overflow: hidden;
		font-family: var(--bx-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
		color: #0f172a;
	}

	body.bx-theme-dark .bx-mobile-sheet-panel {
		background: #121826;
		color: #f8fafc;
		box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
	}

	.bx-mobile-sheet-handle {
		width: 44px;
		height: 5px;
		border-radius: 999px;
		background: rgba(15, 23, 42, 0.12);
		margin: 10px auto 0;
		flex-shrink: 0;
	}

	body.bx-theme-dark .bx-mobile-sheet-handle {
		background: rgba(255, 255, 255, 0.18);
	}

	.bx-mobile-sheet-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 14px 18px 12px;
		border-bottom: 1px solid rgba(15, 23, 42, 0.06);
		flex-shrink: 0;
	}

	body.bx-theme-dark .bx-mobile-sheet-header {
		border-bottom-color: rgba(255, 255, 255, 0.08);
	}

	.bx-mobile-sheet-header h2 {
		margin: 0;
		font-size: 17px;
		font-weight: 800;
		color: inherit;
		letter-spacing: -0.02em;
	}

	.bx-mobile-sheet-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 38px;
		height: 38px;
		border: none !important;
		border-radius: 50%;
		background: rgba(15, 23, 42, 0.06) !important;
		color: #475569 !important;
		cursor: pointer;
		flex-shrink: 0;
		padding: 0 !important;
		box-shadow: none !important;
	}

	body.bx-theme-dark .bx-mobile-sheet-close {
		background: rgba(255, 255, 255, 0.08) !important;
		color: #e2e8f0 !important;
	}

	.bx-mobile-sheet-body {
		flex: 1 1 auto;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0));
	}

	.bx-mobile-sheet-footer {
		flex-shrink: 0;
		padding: 4px 18px calc(14px + env(safe-area-inset-bottom, 0));
		text-align: center;
		border-top: 1px solid rgba(15, 23, 42, 0.06);
	}

	body.bx-theme-dark .bx-mobile-sheet-footer {
		border-top-color: rgba(255, 255, 255, 0.08);
	}

	.bx-mobile-sheet-footer-close {
		display: inline-block;
		padding: 10px 18px;
		border: none !important;
		background: transparent !important;
		color: var(--bx-color-primary, #2563eb) !important;
		font-size: 15px;
		font-weight: 700;
		cursor: pointer;
		box-shadow: none !important;
	}

	/* ── Lista biglietti nel sheet ──────────────────────────── */
	.bx-mobile-sheet-tickets {
		padding: 14px 16px 8px;
		max-width: none !important;
		margin: 0 !important;
		color: inherit !important;
	}

	.bx-mobile-sheet-tickets .bx-account-events {
		display: flex;
		flex-direction: column;
		gap: 18px;
	}

	.bx-mobile-sheet-tickets .bx-event-group {
		margin: 0;
		padding: 0;
		border: none;
		background: transparent;
	}

	.bx-mobile-sheet-tickets .bx-event-group-header {
		margin-bottom: 10px;
		padding: 0;
		border: none;
		background: transparent;
	}

	.bx-mobile-sheet-tickets .bx-event-group-title h3 {
		margin: 0 0 4px;
		font-size: 16px;
		font-weight: 800;
		color: inherit;
	}

	.bx-mobile-sheet-tickets .bx-event-meta,
	.bx-mobile-sheet-tickets .bx-event-link {
		display: none;
	}

	.bx-mobile-sheet-tickets .bx-account-ticket-grid {
		display: flex;
		flex-direction: column;
		gap: 10px;
	}

	.bx-mobile-sheet-tickets .bx-account-ticket {
		padding: 14px;
		border-radius: 16px;
		border: 1px solid rgba(15, 23, 42, 0.08);
		background: #f8fafc;
		box-shadow: none;
	}

	.bx-mobile-sheet-tickets .bx-account-ticket-event {
		margin: 0 0 8px;
		font-size: 14px;
		font-weight: 800;
		color: inherit;
	}

	body.bx-theme-dark .bx-mobile-sheet-tickets .bx-account-ticket {
		background: rgba(255, 255, 255, 0.04);
		border-color: rgba(255, 255, 255, 0.08);
	}

	.bx-mobile-sheet-tickets .bx-account-ticket-meta li:not(.bx-ticket-num-row) {
		display: none;
	}

	.bx-mobile-sheet-tickets .bx-account-ticket-actions {
		display: flex;
		gap: 8px;
		margin-top: 12px;
	}

	.bx-mobile-sheet-tickets .bx-btn {
		flex: 1;
		justify-content: center;
		min-height: 42px;
		border-radius: 12px !important;
		font-size: 13px !important;
		font-weight: 700 !important;
	}

	.bx-mobile-sheet-tickets .bx-account-empty,
	.bx-sheet-empty .bx-account-empty {
		padding: 32px 20px 24px;
		text-align: center;
	}

	.bx-sheet-empty .bx-account-empty-icon,
	.bx-mobile-sheet-tickets .bx-account-empty-icon {
		margin: 0 auto 16px;
		opacity: 0.45;
		color: #64748b;
	}

	.bx-sheet-empty h3,
	.bx-mobile-sheet-tickets .bx-account-empty h3 {
		margin: 0 0 10px;
		font-size: 18px;
		font-weight: 800;
		color: inherit;
	}

	.bx-sheet-empty p,
	.bx-mobile-sheet-tickets .bx-account-empty p {
		margin: 0;
		font-size: 14px;
		line-height: 1.55;
		color: #64748b;
	}

	body.bx-theme-dark .bx-sheet-empty p,
	body.bx-theme-dark .bx-mobile-sheet-tickets .bx-account-empty p {
		color: #94a3b8;
	}

	/* ── QR view nel sheet ──────────────────────────────────── */
	.bx-sheet-qr-view {
		padding: 8px 20px 16px;
		text-align: center;
	}

	.bx-sheet-qr-back {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		margin: 0 0 12px;
		padding: 0;
		border: none !important;
		background: transparent !important;
		color: #64748b !important;
		font-size: 14px;
		font-weight: 600;
		cursor: pointer;
		box-shadow: none !important;
	}

	body.bx-theme-dark .bx-sheet-qr-back {
		color: #94a3b8 !important;
	}

	.bx-sheet-qr-title {
		margin: 0 0 6px;
		font-size: 20px;
		font-weight: 800;
		color: inherit;
	}

	.bx-sheet-qr-event {
		margin: 0 0 4px;
		font-size: 14px;
		color: #64748b;
	}

	body.bx-theme-dark .bx-sheet-qr-event {
		color: #94a3b8;
	}

	.bx-sheet-qr-type {
		margin: 0 0 16px;
		font-size: 13px;
		font-weight: 600;
		color: var(--bx-color-primary, #2563eb);
	}

	.bx-sheet-qr-label {
		margin: 0;
		font-size: 11px;
		font-weight: 700;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		color: #94a3b8;
	}

	.bx-sheet-qr-number {
		margin: 4px 0 8px;
		font-size: 22px;
		font-weight: 800;
		color: inherit;
		letter-spacing: 0.02em;
	}

	.bx-sheet-qr-holder {
		margin: 0 0 18px;
		font-size: 14px;
		color: #64748b;
	}

	.bx-sheet-qr-card {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: 18px;
		margin: 0 auto 14px;
		border-radius: 20px;
		background: #fff;
		box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
	}

	body.bx-theme-dark .bx-sheet-qr-card {
		background: #fff;
	}

	.bx-sheet-qr-image {
		display: block;
		width: min(240px, 62vw);
		height: auto;
	}

	.bx-sheet-qr-hint {
		margin: 0 0 16px;
		font-size: 13px;
		color: #64748b;
	}

	.bx-sheet-qr-pdf {
		display: inline-block;
		padding: 12px 22px;
		border-radius: 12px;
		background: var(--bx-color-primary, #2563eb) !important;
		color: #fff !important;
		text-decoration: none !important;
		font-size: 14px;
		font-weight: 700;
	}

	.bx-mobile-sheet-login {
		padding: 36px 24px;
		text-align: center;
	}

	.bx-mobile-sheet-login h3 {
		margin: 0 0 8px;
		font-size: 18px;
		font-weight: 800;
	}

	.bx-mobile-sheet-login p {
		margin: 0 0 20px;
		color: #64748b;
		font-size: 14px;
		line-height: 1.5;
	}

	.bx-mobile-sheet-login .bx-btn {
		display: inline-flex;
		min-height: 46px;
		padding: 0 24px;
		border-radius: 12px !important;
	}

	.bx-mobile-sheet-loading {
		padding: 56px 20px;
		text-align: center;
		color: #64748b;
		font-size: 14px;
	}

	@keyframes bxMobileSlideUp {
		from { transform: translateY(100%); opacity: 0.5; }
		to   { transform: translateY(0); opacity: 1; }
	}

	@keyframes bxMobileFadeIn {
		from { opacity: 0; }
		to   { opacity: 1; }
	}
}
