/* LABLABI menu motion layer. Only active when fx.js has run (html.fxm). */
html.fxm .card-img{background:linear-gradient(100deg,#EAE3D5 30%,#F3EEE4 50%,#EAE3D5 70%);background-size:300% 100%;animation:fxShim 1.6s linear infinite}
html.fxm .card-img.fx-done{animation:none;background:#EAE3D5}
html.fxm .card-img img{opacity:0;filter:blur(10px);scale:1.06;transition:opacity .6s ease,filter .8s ease,scale 1.1s cubic-bezier(.16,1,.3,1),transform .5s ease}
html.fxm .card-img img.fx-in{opacity:1;filter:none;scale:1}
@keyframes fxShim{from{background-position:100% 0}to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){html.fxm .card-img{animation:none}html.fxm .card-img img{filter:none;scale:1;transition:opacity .2s}}
.fx-nav{position:absolute;left:0;right:0;top:0;aspect-ratio:4/3;pointer-events:none;z-index:5}
.modal:hover 

/* the photo always fills its 4:3 frame, no jumping while it loads */
#modalImg{aspect-ratio:4/3}
#modalImg>img{position:absolute;inset:0;width:100%!important;height:100%!important;object-fit:cover}

/* arrows on the photo: always visible, so guests know they can swipe */
.fx-arr{pointer-events:auto;position:absolute;top:50%;width:38px;height:38px;margin-top:-19px;border-radius:50%;border:1px solid rgba(255,255,255,.35);
  background:rgba(20,18,14,.38);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);color:#fff;cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center;transition:background .2s,transform .2s}
.fx-arr svg{width:16px;height:16px}
.fx-arr.l{left:12px}.fx-arr.r{right:12px}
.fx-arr:active{transform:scale(.9);background:rgba(20,18,14,.6)}
@media (hover:hover){.fx-arr:hover{background:rgba(20,18,14,.6)}}
.fx-nav.one .fx-arr{display:none}
/* first time a dish opens, the arrows nudge once */
.fx-nav.nudge .fx-arr.r{animation:fxNudgeR 1.1s ease .5s 2}
.fx-nav.nudge .fx-arr.l{animation:fxNudgeL 1.1s ease .5s 2}
@keyframes fxNudgeR{0%,100%{transform:none}50%{transform:translateX(5px)}}
@keyframes fxNudgeL{0%,100%{transform:none}50%{transform:translateX(-5px)}}

/* handle at the top: pull down to close (touch screens) */
.fx-grab{position:absolute;left:0;right:0;top:0;height:30px;z-index:6;display:flex;justify-content:center;align-items:flex-start;padding-top:9px;pointer-events:none}
.fx-grab i{width:42px;height:5px;border-radius:5px;background:rgba(255,255,255,.9);box-shadow:0 1px 6px rgba(0,0,0,.35)}
.fx-grab.nudge i{animation:fxGrab 1.1s ease .9s 2}
@keyframes fxGrab{0%,100%{transform:none}50%{transform:translateY(5px)}}
@media (hover:hover) and (pointer:fine){.fx-grab{display:none}}
@media (prefers-reduced-motion:reduce){.fx-nav.nudge .fx-arr,.fx-grab.nudge i{animation:none}}

/* slide between dishes */
#modalImg{overflow:hidden}


/* phones: shorter photo and one fixed height for every dish, so the sheet sits lower and never jumps */
@media (max-width:599px){
  #modalImg,.fx-nav{aspect-ratio:3/2!important}
  /* one steady height that fits the photo and the text; long descriptions scroll inside */
  .modal{height:min(84svh,calc(66.67vw + 380px));max-height:none;background:#F2ECE0}
  /* room under the text for Safari's bottom bar, so nothing hides behind it */
  .modal-body{padding:20px 22px calc(24px + env(safe-area-inset-bottom) + 64px)}
  .modal-name{font-size:25px;margin-bottom:8px}
  .modal-price{font-size:22px;margin-bottom:12px}
  .modal-desc,#modalDesc{font-size:14px;line-height:1.55;margin-bottom:16px}
  .modal .share{padding:9px 18px 9px 11px;font-size:13.5px}
}

/* carousel */
.fx-track{position:absolute;inset:0;will-change:transform;touch-action:pan-y}
.fx-slot{position:absolute;inset:0}
.fx-slot img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.modal-body.fx-txt>*{animation:fxTxt .3s cubic-bezier(.22,1,.36,1)}
@keyframes fxTxt{from{opacity:0;transform:translateX(var(--fx-d,14px))}}

/* text slides with its photo */
.modal{overflow-x:hidden}
.modal-body{will-change:transform}
.fx-ghost{position:absolute;left:0;right:0;pointer-events:none}
.fx-ghost .modal-desc{font-size:14.5px;line-height:1.55}
@media (max-width:599px){.fx-ghost .modal-desc{font-size:14px}}

/* a thin line between dishes while swiping */
.fx-gp::after,.fx-gn::before{content:"";position:absolute;top:0;height:100%;width:2px;background:#d3ac81}
.fx-gp::after{right:-1px}
.fx-gn::before{left:-1px}

/* sheet colour carries on below its edge, so nothing shows under it while it slides */
@media (max-width:599px){.modal{box-shadow:0 160px 0 #F2ECE0}}

/* phones: the pull-down handle does the explaining, so the X is a small light mark, no circle */
@media (max-width:599px){
  .modal-close{top:8px;right:8px;width:40px;height:40px;border:0;background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;font-size:0;color:#fff}
  .modal-close::before{content:"";width:16px;height:16px;background:
    linear-gradient(45deg,transparent calc(50% - .75px),currentColor calc(50% - .75px),currentColor calc(50% + .75px),transparent calc(50% + .75px)),
    linear-gradient(-45deg,transparent calc(50% - .75px),currentColor calc(50% - .75px),currentColor calc(50% + .75px),transparent calc(50% + .75px));
    filter:drop-shadow(0 1px 3px rgba(0,0,0,.55));opacity:.92}
  .modal-close:hover{background:none}
}


/* iPhone Safari colours the area around its bottom bar from a solid, fixed element touching the screen bottom.
   Making the dish sheet itself that element means Safari picks cream as soon as the sheet appears,
   instead of first picking the dark backdrop and catching up later. */
@media (max-width:599px){
  .modal{position:fixed;left:0;right:0;bottom:0;margin:0 auto}
}


@media (max-width:599px){.modal.fx-leaving{position:relative}}

@media (max-width:599px){
  .scrim.fx-abs{position:absolute;left:0;right:0;bottom:auto;height:100lvh}
  .scrim.fx-abs .modal{position:relative}
}

/* phones: share button sits right under the description, clear of Safari's bottom bar */
@media (max-width:599px){
  .modal-desc,#modalDesc{margin-bottom:12px}
  .modal .badges{margin-bottom:12px}
  .modal .badges:empty{display:none}
  .fx-ghost .badges:empty{display:none}
}
