/* ===== Sahara - Build your mezze table (menu page, js/table.js) ===== */
#build-table { --plate: 92px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; align-items: start; text-align: left; margin-top: 34px; }

/* left: pick the dishes */
.bt-picker { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.bt-guests { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-weight: 500; color: var(--maroon); }
.bt-guests span { margin-right: auto; }
.bt-guests button { width: 36px; height: 36px; border: 2px solid var(--gold); background: var(--maroon-dark); color: var(--white); border-radius: 2px; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.bt-guests b { min-width: 28px; text-align: center; font-family: var(--serif); font-size: 1.5rem; color: var(--maroon); }
.bt-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.bt-tabs button { padding: 7px 13px; border: 1px solid #e6d6bd; background: var(--white); color: var(--maroon); border-radius: 2px; font: 500 .88rem var(--sans); cursor: pointer; }
.bt-tabs button.active { background: var(--maroon-dark); border-color: var(--maroon-dark); color: var(--white); }
.bt-list { list-style: none; margin: 0; padding: 0; max-height: 470px; overflow-y: auto; }
.bt-dish { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 6px; border: 0; border-bottom: 1px solid #f0e6d6; background: none; text-align: left; cursor: pointer; font-family: var(--sans); color: var(--text, #333); transition: background .15s; }
.bt-dish:hover { background: #fbf6ee; }
.bt-mini svg { width: 38px; height: 38px; display: block; }
.bt-dish-text { flex: 1; min-width: 0; }
.bt-dish-text b { display: block; font-weight: 500; color: var(--maroon); }
.bt-dish-text abbr { text-decoration: none; font-size: .7rem; color: #4f7a2b; border: 1px solid #a9c48e; border-radius: 2px; padding: 0 3px; }
.bt-dish-text small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-price { font-family: var(--serif); color: var(--orange); white-space: nowrap; }
.bt-add { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 2px solid var(--gold); border-radius: 2px; color: var(--maroon-dark); font-weight: 700; }
.bt-dish.on .bt-add { background: var(--gold); }

/* right: the table, seen from above */
.bt-side { position: sticky; top: calc(var(--sticky-h, 80px) + 16px); }
.bt-table { position: relative; min-height: 380px; padding: 46px 26px; border-radius: 22px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .16), transparent 60%), repeating-linear-gradient(92deg, rgba(0, 0, 0, .06) 0 2px, transparent 2px 9px, rgba(255, 255, 255, .04) 9px 11px, transparent 11px 23px), linear-gradient(135deg, #8b5a33, #6d4426 55%, #5a361e);
  box-shadow: inset 0 0 0 8px #4e2e19, inset 0 0 0 10px rgba(227, 179, 65, .35), 0 18px 40px rgba(40, 15, 5, .35); }
.bt-settings { position: absolute; left: 0; right: 0; display: flex; justify-content: space-around; padding: 0 30px; }
.bt-settings-top { top: 12px; }
.bt-settings-bottom { bottom: 12px; transform: rotate(180deg); }
.bt-setting svg { width: 46px; height: 28px; display: block; opacity: .9; }
.bt-plates { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 12px 10px; flex: 1; }
.bt-plate { position: relative; width: var(--plate); padding: 0; border: 0; background: none; cursor: pointer; transition: width .3s ease; }
.bt-plate svg { display: block; width: 100%; height: auto; transition: transform .2s; }
.bt-plate:hover svg { transform: scale(1.06) rotate(-4deg); }
.bt-plate span { display: block; margin-top: 3px; font: 500 .7rem/1.2 var(--sans); color: #f6ead6; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); text-align: center; }
.bt-plate::after { content: "×"; position: absolute; top: -2px; right: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--maroon-dark); color: #fff; font-size: .85rem; line-height: 20px; text-align: center; opacity: 0; transition: opacity .2s; }
.bt-plate:hover::after { opacity: 1; }
.bt-plate.new { animation: bt-land .55s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes bt-land { 0% { transform: translateY(-60px) scale(.6) rotate(-20deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.bt-empty { display: none; margin: auto; max-width: 260px; text-align: center; color: #f3e3c8; font-family: var(--serif); font-size: 1.15rem; }
.bt-table.is-empty .bt-empty { display: block; }

.bt-summary { margin-top: 18px; padding: 20px 22px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.bt-advice { margin: 0 0 12px; color: var(--muted); }
.bt-advice b { color: var(--maroon); }
.bt-total { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.bt-total span { font-weight: 500; color: var(--maroon); }
.bt-total b { font-family: var(--serif); font-size: 1.9rem; color: var(--maroon); }
.bt-total small { color: var(--muted); }
.bt-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bt-clear { margin-left: auto; padding: 6px 4px; border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font: .88rem var(--sans); }

.bt-toast { position: fixed; left: 50%; bottom: 76px; z-index: 70; max-width: calc(100% - 24px); padding: 11px 16px; border: 2px solid var(--gold); border-radius: 2px; background: var(--maroon-dark); color: #fff; font: .9rem/1.35 var(--sans); text-align: center; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.bt-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.bt-toast b { color: var(--gold); font-weight: 500; }
.bt-toast u { margin-left: 6px; color: var(--gold); }
@media (min-width: 1081px) { .bt-toast { bottom: 24px; } }

@media (max-width: 900px) {
  #build-table { grid-template-columns: minmax(0, 1fr); }
  .bt-side { position: static; order: -1; }
  .bt-list { max-height: 360px; }
}
@media (max-width: 600px) {
  .bt-table { min-height: 300px; padding: 40px 12px; }
  #build-table { --plate: 70px !important; }
  .bt-setting svg { width: 34px; height: 21px; }
  .bt-picker { padding: 16px; }
  .bt-clear { margin-left: 0; }
}
