/*!
 * Simulatore “Componi la tua focaccina”.
 * Pensato prima per il telefono: una colonna, bersagli larghi, anteprima
 * sempre visibile mentre si sceglie.
 * TripTimeBeer — CodyCloud Srls
 */

.ttb-builder {
	--b-ink: var(--ink, #100e0c);
	--b-cream: var(--cream, #f7f2e7);
	--b-amber: var(--amber, #e5a02a);
	--b-copper: var(--copper, #b8551f);
	--b-line: rgba(43, 38, 32, .16);
	--b-radius: 12px;

	color: #2b2620;
	margin: 1.5rem 0 0;
}

.ttb-builder__noscript {
	background: rgba(229, 160, 42, .14);
	border-left: 3px solid var(--b-amber);
	font-size: .9375rem;
	padding: .75rem 1rem;
}

.ttb-b-grid {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: 1fr;
}

/* ----- anteprima -----
   Sul telefono resta una fascia bassa e sempre visibile: disegno a sinistra,
   ingredienti a destra. Sopra i 760px torna una colonna a fianco del pannello. */

.ttb-b-preview {
	align-items: center;
	background: #fff;
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius);
	box-shadow: 0 8px 18px -12px rgba(24, 18, 10, .45);
	display: flex;
	gap: .85rem;
	padding: .7rem;
	position: sticky;
	/* Si appoggia sotto le barre del sito: l'altezza la comunica il tema. */
	top: calc(var(--ttb-sticky-top, 112px) + .5rem);
	transition: top .28s ease;
	z-index: 1;
}

/* Riquadro del disegno ad altezza fissa: il panino ci cresce dentro
   appoggiato in basso, senza mai spostare il resto della pagina. */
.ttb-b-preview__art {
	flex: 0 0 100px;
	height: 92px;
}

.ttb-b-preview__list {
	flex: 1 1 auto;
	min-width: 0;
}

.ttb-focaccia {
	display: block;
	height: 100%;
	width: 100%;
}

.ttb-b-stack {
	display: flex;
	flex-wrap: wrap;
	gap: .3rem .7rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ttb-b-stack li {
	align-items: center;
	display: flex;
	font-size: .8125rem;
	gap: .35rem;
	line-height: 1.35;
	margin: 0;
}

.ttb-b-empty {
	color: #6b6154;
	font-size: .875rem;
	margin: 0;
}

.ttb-b-dot {
	border-radius: 50%;
	display: inline-block;
	flex: none;
	height: 10px;
	width: 10px;
}

/* Stessi colori degli strati del disegno. */
.ttb-b-dot--salumi-artigianali { background: #cf6f6c; }
.ttb-b-dot--pesce { background: #f2a07c; }
.ttb-b-dot--formaggi { background: #f3ce6d; }
.ttb-b-dot--salse-e-cremine { background: #dd8a3f; }
.ttb-b-dot--verdure { background: #8fb85a; }

/* ----- pannello ----- */

.ttb-b-lead {
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .1em;
	margin: 0 0 .75rem;
	text-transform: uppercase;
	color: var(--b-copper);
}

.ttb-b-cards {
	display: grid;
	gap: .6rem;
	grid-template-columns: 1fr;
}

.ttb-b-card {
	background: #fff;
	border: 1px solid var(--b-line);
	border-radius: var(--b-radius);
	cursor: pointer;
	display: grid;
	gap: .15rem;
	grid-template-columns: 1fr auto;
	min-height: 60px;
	padding: .85rem 1rem;
	text-align: left;
	transition: border-color .16s ease, transform .16s ease;
	width: 100%;
}

.ttb-b-card:hover,
.ttb-b-card:focus-visible {
	border-color: var(--b-copper);
	transform: translateY(-1px);
}

.ttb-b-card--alt {
	background: #fbf7ef;
}

.ttb-b-card__name {
	font-size: 1.0625rem;
	font-weight: 700;
}

.ttb-b-card__price {
	color: var(--b-copper);
	font-weight: 700;
	white-space: nowrap;
}

.ttb-b-card__desc {
	color: #6b6154;
	font-size: .875rem;
	grid-column: 1 / -1;
}

.ttb-b-bar {
	align-items: center;
	display: flex;
	gap: .75rem;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.ttb-b-back {
	background: none;
	border: 0;
	color: var(--b-copper);
	cursor: pointer;
	flex: none;
	font-size: .9375rem;
	min-height: 44px;
	padding: 0;
	white-space: nowrap;
}

.ttb-b-bar__name {
	font-size: .9375rem;
	font-weight: 700;
	min-width: 0;
	text-align: right;
}

.ttb-b-slot {
	border-top: 1px solid var(--b-line);
	margin: 0;
	padding: .9rem 0 1rem;
}

.ttb-b-slot__title {
	align-items: baseline;
	display: flex;
	font-size: 1rem;
	font-weight: 700;
	gap: .5rem;
	justify-content: space-between;
	margin: 0;
	padding: 0;
	width: 100%;
}

.ttb-b-slot__title em {
	color: #6b6154;
	font-size: .8125rem;
	font-style: normal;
	font-variant-numeric: tabular-nums;
}

.ttb-b-slot.is-done .ttb-b-slot__title em {
	color: #1e7a3c;
	font-weight: 700;
}

.ttb-b-chips {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	margin-top: .5rem;
}

.ttb-b-chip {
	background: #fff;
	border: 1px solid var(--b-line);
	border-radius: 999px;
	color: inherit;
	cursor: pointer;
	font-size: .875rem;
	min-height: 44px;
	padding: .5rem .9rem;
	transition: background-color .14s ease, border-color .14s ease;
}

.ttb-b-chip:hover:not([disabled]) {
	border-color: var(--b-copper);
}

.ttb-b-chip.is-on {
	background: var(--b-amber);
	border-color: var(--b-amber);
	color: #14100a;
	font-weight: 700;
}

.ttb-b-chip[disabled] {
	cursor: not-allowed;
	opacity: .4;
}

.ttb-b-total {
	align-items: center;
	background: #f4efe4;
	border-radius: var(--b-radius);
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin-top: 1.1rem;
	padding: .85rem 1rem;
}

.ttb-b-total.is-ready {
	background: #e8f4ea;
}

.ttb-b-total__label {
	font-size: .9375rem;
	font-weight: 700;
}

.ttb-b-total.is-ready .ttb-b-total__label {
	color: #1e7a3c;
}

.ttb-b-total__price {
	font-size: 1.375rem;
	font-weight: 700;
	color: var(--b-copper);
	white-space: nowrap;
}

.ttb-b-hint {
	color: #6b6154;
	font-size: .8125rem;
	margin: .6rem 0 0;
}

[data-ttb-preset-detail] .ttb-b-hint {
	margin: 0 0 .9rem;
}

.ttb-b-result {
	align-items: center;
	background: #f4efe4;
	border-radius: var(--b-radius);
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin: 0 0 .9rem;
	padding: .75rem 1rem;
}

.ttb-b-result__name {
	font-size: 1.0625rem;
	margin: 0;
}

.ttb-b-result__price {
	color: var(--b-copper);
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0;
	white-space: nowrap;
}

/* ----- da tablet in su: anteprima a fianco ----- */

@media (min-width: 760px) {
	.ttb-b-grid {
		grid-template-columns: 230px 1fr;
		gap: 1.5rem;
	}

	.ttb-b-preview {
		align-items: stretch;
		align-self: start;
		box-shadow: none;
		display: block;
		padding: 1rem;
	}

	.ttb-b-preview__art {
		height: 166px;
		margin: 0 auto;
		max-width: 190px;
	}

	.ttb-b-preview__list {
		margin-top: .6rem;
	}

	.ttb-b-stack li {
		font-size: .875rem;
	}

	.ttb-b-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.ttb-b-grid {
		grid-template-columns: 250px 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ttb-b-card,
	.ttb-b-chip {
		transition: none;
	}
}
