/* "Crează-ți shaorma/pita" (assets/configurator.js): the button above the menu and on the Shaorma and Pita cards, and the configurator
   itself: a wide sheet with the open flatbread (the drawings stacked in one square) and the ingredient tiles. */
html:not(.js) [data-cfg], html:not(.js) .cfg-cta, .cfg-cta[hidden], .cfg-btn[hidden], .cfg-link[hidden] { display: none; }

/* above the menu */
.cfg-cta { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px 28px; margin: -14px 0 34px; padding: 18px 28px 18px 18px;
  border-radius: 18px; border: 1px solid rgba(224,112,47,.4); background: radial-gradient(120% 140% at 0% 50%, rgba(224,112,47,.22), transparent 60%), linear-gradient(180deg, var(--card-2), var(--card)); }
.cfg-cta img { width: 132px; height: 132px; filter: drop-shadow(0 14px 24px rgba(0,0,0,.45)); transform: rotate(-6deg); }
.cfg-cta .eyebrow { margin-bottom: 6px; }
.cfg-cta h3 { font-size: clamp(28px, 3.4vw, 40px); color: var(--gold); }
.cfg-cta p { margin: 6px 0 0; color: var(--muted); font-size: 15px; max-width: 560px; }
.cfg-cta .btn { border: 0; cursor: pointer; white-space: nowrap; }
.cfg-cta .btn .ico, .cfg-btn .ico, .cfg-link .ico, .cfg-acts .ico { width: 16px; height: 16px; }

/* on the Shaorma card and in its product sheet */
.cfg-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: -4px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: none; border: 1px dashed rgba(233,184,114,.55); color: var(--gold); font: 700 12px "Inter", sans-serif; letter-spacing: 1px; text-transform: uppercase;
  transition: background .3s, border-color .3s, color .3s; }
.cfg-btn:hover { background: rgba(233,184,114,.1); border-style: solid; color: var(--cream); }
.cfg-link { display: flex; align-items: center; gap: 10px; width: 100%; margin: 16px 0 0; padding: 12px 16px; border-radius: 14px; cursor: pointer; text-align: left;
  background: rgba(233,184,114,.08); border: 1px solid rgba(233,184,114,.35); color: var(--gold); font: 700 14px "Inter", sans-serif; transition: background .3s, border-color .3s; }
.cfg-link:hover { background: rgba(233,184,114,.16); border-color: var(--gold); }

/* the configurator sheet */
dialog.sheet.cfg { width: min(1040px, 100%); overflow: hidden; }
.cfg .sheet-head { gap: 14px; }
.cfg-h { min-width: 0; flex: 1; }
.cfg-k { display: block; font: 700 11px "Inter", sans-serif; letter-spacing: 2.4px; text-transform: uppercase; color: var(--gold); }
.cfg-h h3 { font-size: clamp(24px, 3vw, 32px); color: var(--cream); }
.cfg-price { margin: 0; text-align: right; white-space: nowrap; }
.cfg-price small { color: var(--muted); font-size: 12px; }
.cfg-price b { font-family: var(--display); font-weight: 400; font-size: 30px; color: var(--accent-2); letter-spacing: .5px; }
.cfg-body { display: grid; grid-template-columns: minmax(300px, 440px) 1fr; gap: 8px 30px; align-items: start; padding-top: 18px; }
.cfg-left { position: sticky; top: 0; text-align: center; }
.cfg-stage { position: relative; width: 100%; max-width: 440px; aspect-ratio: 1; margin: 0 auto; }
.cfg-glow { position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(closest-side, rgba(224,112,47,.22), transparent); filter: blur(6px); }
.cfg-art { position: absolute; inset: 0; }
.cfg-art > * { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .2s; }
.cfg-art > .out { opacity: 0; }
.cfg-art > .in { animation: cfg-drop .5s var(--ease) both; transform-origin: 50% 53%; }
.cfg-art > .roll-in { animation: cfg-zoom .55s cubic-bezier(.2,.9,.3,1.25) both; }
@keyframes cfg-drop { from { opacity: 0; transform: translateY(-7%) scale(1.1); } to { opacity: 1; transform: none; } }
@keyframes cfg-zoom { from { opacity: 0; transform: scale(.84) rotate(-5deg); } to { opacity: 1; transform: none; } }
/* placeholders, only when a drawing is missing: the flatbread, a scatter of the ingredient's colour on the filling, the roll */
.cfg-art > .cfg-phb { inset: 4%; width: 92%; height: 92%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #F0CF96, #D9A35E 70%, #B9803F); box-shadow: 0 18px 30px rgba(0,0,0,.4); }
.cfg-art > .cfg-phl { left: 18%; top: 40%; width: 64%; height: 26%; border-radius: 50%; opacity: .92;
  background: radial-gradient(circle at 12% 40%, var(--c) 0 5%, transparent 6%), radial-gradient(circle at 30% 64%, var(--c) 0 6%, transparent 7%),
  radial-gradient(circle at 46% 34%, var(--c) 0 5%, transparent 6%), radial-gradient(circle at 62% 60%, var(--c) 0 6%, transparent 7%),
  radial-gradient(circle at 78% 38%, var(--c) 0 5%, transparent 6%), radial-gradient(circle at 90% 62%, var(--c) 0 4%, transparent 5%); }
.cfg-art > .cfg-phr { left: 28%; top: 14%; width: 44%; height: 72%; border-radius: 40% 40% 30% 30%; background: linear-gradient(170deg, #F0CF96, #C98B4A); transform: rotate(14deg); box-shadow: 0 18px 30px rgba(0,0,0,.4); }
.cfg-base { margin: 4px 0 0; display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; font: 700 11px "Inter", sans-serif; letter-spacing: 2.4px; text-transform: uppercase; color: var(--gold); }
.cfg-clear { background: none; border: 0; padding: 4px 2px; cursor: pointer; color: var(--muted); font: 600 12.5px "Inter", sans-serif; letter-spacing: 0; text-transform: none; text-decoration: underline; text-underline-offset: 3px; }
.cfg-clear:hover { color: var(--cream); }
.cfg-sum { margin: 8px auto 0; max-width: 420px; min-height: 3em; font-size: 14px; color: var(--muted); }

.cfg-ctl { min-width: 0; }
.cfg-g { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.cfg-g legend { display: block; padding: 0; margin-bottom: 8px; font: 700 12px "Inter", sans-serif; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.cfg-g legend small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.cfg-tiles { display: flex; flex-wrap: wrap; gap: 6px; }
.cfg-t { position: relative; cursor: pointer; }
.cfg-t input { position: absolute; opacity: 0; pointer-events: none; }
.cfg-tile { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 84px; padding: 6px 4px 8px; border-radius: 16px; text-align: center; border: 1.5px solid transparent;
  transition: background .25s, border-color .25s, transform .3s var(--ease); }
.cfg-t:hover .cfg-tile { background: rgba(244,233,216,.05); }
.cfg-ic { position: relative; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 16px; background: rgba(244,233,216,.04); border: 1px solid var(--line); transition: border-color .25s, box-shadow .25s; }
.cfg-ic img { width: 58px; height: 58px; }
.cfg-ph, .cfg-fly .cfg-ph { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--c, #CDB48A); color: rgba(20,9,4,.7); font: 700 18px "Inter", sans-serif;
  box-shadow: inset 0 -6px 12px rgba(0,0,0,.18); }
.cfg-tile b { font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--cream); }
.cfg-tile small { font-size: 11px; color: var(--muted); line-height: 1.2; }
.cfg-ok { position: absolute; right: -5px; top: -5px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg-2); opacity: 0; transform: scale(.4);
  transition: opacity .2s, transform .3s var(--ease); }
.cfg-ok::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cfg-t input:checked + .cfg-tile .cfg-ic { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 22px -8px rgba(224,112,47,.7); }
.cfg-t input:checked + .cfg-tile .cfg-ok { opacity: 1; transform: none; }
.cfg-t input:checked + .cfg-tile b { color: var(--accent-2); }
.cfg-t input:focus-visible + .cfg-tile { border-color: var(--accent-2); }
.cfg-t input:disabled + .cfg-tile { opacity: .4; cursor: not-allowed; }
.cfg-t:active .cfg-tile { transform: scale(.94); }
.cfg-fly { position: absolute; left: 0; top: 0; z-index: 90; display: grid; place-items: center; pointer-events: none; will-change: transform; }
.cfg-fly img { width: 100%; height: 100%; }
.cfg .is-alg { margin-top: 4px; }
.cfg-lim { margin: 6px 0 0; font-size: 13px; color: var(--gold); }

.cfg-foot { display: grid; gap: 10px; }
.cfg-foot [hidden] { display: none; }
.cfg-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.cfg-acts .btn, .cfg-go { justify-content: center; cursor: pointer; padding-top: 13px; padding-bottom: 13px; }
.cfg-acts .btn { background: none; font-size: 13px; letter-spacing: 1px; white-space: normal; line-height: 1.25; text-align: center; }
.cfg-go { width: 100%; border: 0; }
.cfg-go[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.cfg-go[disabled]::after { display: none; }
.cfg-unroll { display: block; margin: 6px auto 0; background: none; border: 0; color: var(--gold); font: 600 13.5px "Inter", sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cfg-off { margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(233,184,114,.1); border: 1px solid rgba(233,184,114,.35); color: var(--gold); font-size: 14px; }

@media (max-width: 900px) {
  .cfg-body { grid-template-columns: 1fr; padding-top: 0; }
  /* the flatbread stays in view while the tiles scroll under it */
  .cfg-left { z-index: 2; margin: 0 -24px; padding: 10px 24px 6px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
  .cfg-stage { width: min(100%, 25vh, 340px); }
  .cfg-base { margin-top: 0; }
  .cfg-sum { min-height: 0; font-size: 12.5px; line-height: 1.4; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .cfg-ctl { padding-top: 14px; }
  /* one row of tiles per group, scrolled sideways */
  .cfg-tiles { flex-wrap: nowrap; overflow-x: auto; margin: 0 -24px; padding: 4px 24px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .cfg-tiles::-webkit-scrollbar { display: none; }
  .cfg-t { flex: none; scroll-snap-align: start; }
}
@media (max-width: 760px) {
  dialog.sheet.cfg { height: 96%; max-height: 96%; }
}
@media (max-width: 620px) {
  /* on the card the button sits under the two lines of ingredients, next to the round "+" */
  #menu-grid .cfg-btn { margin-top: 6px; padding: 7px 12px; font-size: 12.5px; letter-spacing: 0; text-transform: none; }
  .cfg .sheet-head { padding-top: 14px; padding-bottom: 12px; }
  .cfg-cta { grid-template-columns: 76px 1fr; gap: 12px 16px; padding: 14px; margin: 0 0 16px; }
  .cfg-cta img { width: 76px; height: 76px; }
  .cfg-cta p { font-size: 13.5px; }
  .cfg-cta .eyebrow { display: none; }
  .cfg-cta h3 { font-size: 24px; }
  .cfg-cta .btn { grid-column: 1 / -1; justify-content: center; padding: 14px 18px; }
  .cfg-left { margin: 0 -18px; padding: 8px 18px 6px; }
  .cfg-tiles { margin: 0 -18px; padding: 4px 18px 6px; }
  .cfg-h h3 { font-size: 21px; white-space: nowrap; }
  .cfg-k { display: none; }
  .cfg-price b { font-size: 24px; }
  .cfg-tile { width: 74px; }
  .cfg-ic { width: 56px; height: 56px; }
  .cfg-ic img { width: 50px; height: 50px; }
  .cfg-acts { gap: 8px; margin-bottom: 8px; }
  .cfg-acts .btn { font-size: 12px; letter-spacing: .6px; padding: 10px; }
  .cfg-go { padding-top: 14px; padding-bottom: 14px; }
  .cfg-foot { padding-top: 10px; padding-bottom: 12px; gap: 8px; }
  .cfg-g { margin-bottom: 12px; }
  .cfg-g legend { margin-bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .cfg-art > .in, .cfg-art > .roll-in { animation: none; }
  .cfg-art > *, .cfg-ok, .cfg-tile, .cfg-ic { transition: none; }
}
