/* Frontend styles */
.jd-dm{
  --jd-primary:#1F5861;
  --jd-accent:#C6A43B;
  --jd-hoverbg:#C6A43B;
  --jd-hovertext:#102b2f;
  --jd-iconbg:#fff;
  --jd-iconfg:#1F5861;
  --jd-bgimg:none;
  --jd-bgopacity:.22;

  position:relative;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow:hidden;
}

.jd-dm--hasbg::before{
  content:"";
  position:absolute; inset:0;
  background-image: var(--jd-bgimg);
  background-size: cover;
  background-position:center;
  opacity: var(--jd-bgopacity);
  pointer-events:none;
  z-index:0;
}
.jd-dm--overlay::after{
  content:"";
  position:absolute; inset:0;
  background: rgba(0,0,0,.35);
  pointer-events:none;
  z-index:0;
}

.jd-dm > *{ position:relative; z-index:1; }

.jd-dm__header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}
.jd-dm__title{
  margin:0;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: #fff;
}
.jd-dm--hasbg .jd-dm__title,
.jd-dm--overlay .jd-dm__title{ color:#fff; }

.jd-dm__lang{
  display:flex;
  align-items:center;
  gap:8px;
}

.jd-dm__controls{
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.jd-dm__search{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  outline: none;
  background: rgba(0,0,0,.20);
  color:#fff;
}
.jd-dm__search::placeholder{ color: rgba(255,255,255,.75); }
.jd-dm__search:focus{
  border-color: var(--jd-accent);
  box-shadow: 0 0 0 3px rgba(198,164,59,.18);
}

.jd-dm__allergensFilter{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.jd-dm__chip{
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.20);
  color:#fff;
  border-radius: 999px;
  padding: 8px 10px;
  cursor:pointer;
  font-size: 13px;
}
.jd-dm__chip--active{
  background: var(--jd-primary);
  border-color: var(--jd-primary);
  color: #fff;
}

.jd-dm__tabs{
  position: sticky;
  top: 10px;
  z-index: 20;
  margin-top: 14px;
  display:flex;
  gap:10px;
  overflow:auto;
  padding: 10px 0;
}
.jd-dm__tab{
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.20);
  color:#fff;
  border-radius: 999px;
  padding: 10px 14px;
  cursor:pointer;
  white-space:nowrap;
}
.jd-dm__tab:hover{
  background: var(--jd-hoverbg);
  color: var(--jd-hovertext);
}

.jd-dm__content{ margin-top: 8px; }

.jd-dm__section{
  padding-top: 16px;
}
.jd-dm__sectionTop{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom: 10px;
}
.jd-dm__sectionTitle{
  margin: 0;
  font-size: 22px;
  color: #fff;
}

.jd-dm__subtabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.jd-dm__subtab{
  border: 2px solid var(--jd-accent);
  background: rgba(0,0,0,.18);
  color:#fff;
  border-radius: 12px;
  padding: 10px 14px;
  cursor:pointer;
}
.jd-dm__subtab:hover{
  background: var(--jd-hoverbg);
  color: var(--jd-hovertext);
}

.jd-dm__subsection{
  margin-top: 10px;
}

.jd-dm__grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 780px){ .jd-dm__grid{ grid-template-columns: repeat(2, 1fr);} }
@media (min-width: 1080px){ .jd-dm__grid{ grid-template-columns: repeat(3, 1fr);} }

.jd-dm__card{
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  overflow:hidden;
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(8px);
  display:flex;
  flex-direction:column;
}
.jd-dm__img{
  height: 140px;
  background-size: cover;
  background-position:center;
}
.jd-dm__body{
  padding: 12px;
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.jd-dm__row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}
.jd-dm__dishTitle{
  margin:0;
  font-size: 16px;
  line-height:1.15;
  color:#fff;
}
.jd-dm__price{
  font-weight: 800;
  color: var(--jd-accent);
  white-space:nowrap;
}
.jd-dm__excerpt{
  margin:0;
  color: rgba(255,255,255,.88);
  line-height:1.35;
  font-size: 13px;
}

.jd-dm__allIcons{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top: 2px;
}
.jd-dm__allIcon{
  text-decoration:none;
}
.jd-dm__iconCircle{
  width:32px;
  height:32px;
  border-radius: 999px;
  background: var(--jd-iconbg);
  color: var(--jd-iconfg);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border: 1px solid rgba(0,0,0,.08);
}
.jd-dm__svgIcon{
  width:18px;
  height:18px;
  display:block;
}

.jd-dm__more{
  align-self:flex-start;
  border: none;
  background: var(--jd-primary);
  color:#fff;
  border-radius: 12px;
  padding: 10px 12px;
  cursor:pointer;
}
.jd-dm__more:hover{
  background: var(--jd-hoverbg);
  color: var(--jd-hovertext);
}

.jd-dm__emptyState{
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,.35);
  color:#fff;
  opacity: .9;
}

/* Legend */
.jd-dm__legend{
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.18);
}
.jd-dm__legendTitle{
  margin: 0 0 10px;
  font-size: 16px;
  color: #fff;
}
.jd-dm__legendGrid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 860px){
  .jd-dm__legendGrid{ grid-template-columns: repeat(2, 1fr); }
}
.jd-dm__legendItem{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: rgba(0,0,0,.20);
  scroll-margin-top: 90px;
}
.jd-dm__legendDesc{
  color: rgba(255,255,255,.85);
  font-size: 13px;
  line-height: 1.35;
}

/* Modal */
.jd-dm__modal{
  border: none;
  border-radius: 16px;
  max-width: 900px;
  width: min(900px, 92vw);
  padding: 0;
}
.jd-dm__close{
  position:absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background:#fff;
  cursor:pointer;
  font-size: 20px;
  line-height: 1;
}
.jd-dm__modalInner{ display:grid; grid-template-columns: 1fr; }
@media (min-width: 860px){ .jd-dm__modalInner{ grid-template-columns: 320px 1fr; } }
.jd-dm__modalImgWrap{ background:#f6f6f6; min-height: 220px; }
.jd-dm__modalImg{ width:100%; height:100%; object-fit: cover; display:block; }
.jd-dm__modalText{ padding: 18px; }

/* Splash animation */
.jd-dm-splash{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 99999;
}
.jd-dm-splash__logo{
  width: 140px; height: 140px;
  transform: scale(.85);
  opacity: 0;
  transition: transform .45s ease, opacity .45s ease;
}
.jd-dm-splash.is-in .jd-dm-splash__logo{
  transform: scale(1);
  opacity: 1;
}
.jd-dm-splash.is-out .jd-dm-splash__logo{
  transform: translate(calc(-50vw + 70px), calc(-50vh + 40px)) scale(.32);
  opacity: 0;
  transition: transform .55s ease, opacity .35s ease;
}


/* Note between dishes */
.jd-dm__note{
  border-top: 1px dashed rgba(255,255,255,.35);
  border-bottom: 1px dashed rgba(255,255,255,.35);
  padding: 10px 0;
  margin: 6px 0 10px;
  color:#fff;
}
.jd-dm__noteTitle{
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 6px;
}
.jd-dm__noteText{
  color: rgba(255,255,255,.9);
  line-height: 1.35;
  font-size: 13px;
}

/* Written allergens line */
.jd-dm__allText{
  margin:0;
  color: rgba(255,255,255,.85);
  font-size: 12px;
  line-height: 1.25;
}

/* Footer bar */
.jd-dm__footerbar{
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.18);
  display:flex;
  gap: 14px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
.jd-dm__footerLogo img{
  height: 40px;
  width:auto;
  display:block;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.25));
}
.jd-dm__reviews{
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:flex-end;
}
.jd-dm__reviewsTitle{
  color:#fff;
  font-weight: 700;
}
.jd-dm__reviewsIcons{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.jd-dm__reviewIcon{
  width:36px;
  height:36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.20);
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-weight: 800;
  letter-spacing: -.02em;
}
.jd-dm__reviewIcon:hover{
  background: var(--jd-hoverbg);
  color: var(--jd-hovertext);
}
.jd-dm__reviewsHint{
  font-size: 11px;
  color: rgba(255,255,255,.75);
}

.jd-dm__reviewSvg{
  width: 18px;
  height: 18px;
  display:block;
}
