/* Shared menu chrome: spinner gate + hide Google Translate remnants */

/* Hide until template gate reveals the page */
body {
  visibility: hidden;
  top: 0 !important;
}

body.jet-menu-pending {
  visibility: hidden;
}

#spinnerOverlay {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 6px solid #ccc;
  border-top-color: var(--primary-color, #4caf50);
  border-radius: 50%;
  animation: jet-menu-spin 1s linear infinite;
}

@keyframes jet-menu-spin {
  to {
    transform: rotate(360deg);
  }
}

body > .skiptranslate,
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget-simple {
  display: none !important;
  visibility: hidden !important;
}

/* Host GT: fuori schermo (non display:none, altrimenti il widget non inizializza) */
#google_translate_element {
  position: absolute !important;
  left: -9999px !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Dropdown lingue: lista lunga scrollabile */
.jet-lang-menu {
  max-height: min(70vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  min-width: 11.5rem;
}

.jet-lang-menu .dropdown-item.active,
.jet-lang-menu .dropdown-item:active {
  background-color: rgba(0, 0, 0, 0.06);
  color: inherit;
}

/* ---- Shared photo zoom viewport (menu1/2/3) ---- */
.jet-pz-viewport,
#dishPhotoCarousel .carousel-item,
#photo-modal .carousel-images {
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#dishPhotoCarousel .carousel-item.jet-pz-viewport,
#dishPhotoCarousel .carousel-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42vh;
  max-height: 78vh;
  background: #0b0b0b;
}

#dishPhotoCarousel .carousel-item img.jet-pz-img,
#dishPhotoCarousel .carousel-item img,
#photo-modal .carousel-images img.jet-pz-img,
#photo-modal .carousel-images img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  cursor: zoom-in;
  touch-action: none;
  -webkit-user-drag: none;
  user-select: none;
}

#photo-modal .carousel-container {
  overflow: hidden;
  max-height: 78vh;
  background: #0b0b0b;
}

.dish-photo-zoom-hint,
#dishPhotoZoomHint,
#photoZoomHint {
  font-size: 0.8rem;
  opacity: 0.85;
}

/* ---- Multi-photo badge ---- */
.jet-photo-badge {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  z-index: 2;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.6rem;
  text-align: center;
  pointer-events: none;
  letter-spacing: 0.02em;
}

.dish-image,
.dish-image-area,
.dish-card-image,
.dish-image-wrapper {
  position: relative;
}

/* ---- Category jump chips (menu1 / menu4) ---- */
.jet-cat-jump {
  position: relative;
  z-index: 40;
  background: color-mix(in srgb, var(--container-bg, #fff) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.55rem 0;
  margin: 0 0 0.75rem;
}

.jet-cat-jump-track {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0 0.85rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.jet-cat-jump-track::-webkit-scrollbar {
  display: none;
}

.jet-cat-jump-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--container-bg, #fff);
  color: var(--text-color, #222);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.86rem;
  font-weight: 560;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease;
}

.jet-cat-jump-chip:hover {
  transform: translateY(-1px);
  border-color: var(--primary-color, #4caf50);
}

.jet-cat-jump-chip.active {
  background: var(--primary-color, #4caf50);
  border-color: var(--primary-color, #4caf50);
  color: #fff;
}

/* ---- Client dish filters ---- */
.jet-dish-filters {
  position: relative;
  z-index: 39;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  margin: 0 0 0.65rem;
  background: color-mix(in srgb, var(--container-bg, #fff) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#jetCategoryJump + .jet-dish-filters,
.jet-cat-jump + .jet-dish-filters {
  border-top: none;
}

/* ---- Category photo headers ---- */
.jet-cat-header {
  margin: 0 0 1rem;
}

.jet-cat-header.has-photo {
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  color: #fff;
}

.jet-cat-media {
  position: relative;
  width: 100%;
  max-height: 160px;
  overflow: hidden;
}

.jet-cat-media img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  filter: brightness(0.85);
}

.jet-cat-header.has-photo .jet-cat-header-text {
  padding: 0.85rem 1rem 1rem;
}

.jet-cat-header.has-photo .category-title,
.jet-cat-header.has-photo .category-title h2,
.jet-cat-header.has-photo h2.category-title {
  color: #fff;
  margin: 0;
}

.jet-cat-header.has-photo .category-description,
.jet-cat-header.has-photo .category-description-text {
  color: rgba(255, 255, 255, 0.85);
}

/* menu2 category chips with photo */
.opi-cat-item.has-photo {
  background-size: cover;
  background-position: center;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  border-color: transparent;
  position: relative;
  overflow: hidden;
}

.opi-cat-item.has-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.opi-cat-item.has-photo > * {
  position: relative;
  z-index: 1;
}

/* ---- Compact no-photo dish rows/cards ---- */
.dish-item.no-image-column .dish-image {
  display: none;
}

.dish-magazine-card.no-image .dish-image-wrapper {
  display: none;
}

.dish-magazine-card.no-image .dish-card-content {
  padding-left: 0.25rem;
}

.dish-grid-item-wrapper.no-image .dish-card-image {
  display: none;
}

.card-internal-grid.no-image .dish-image-area {
  display: none;
}

/* ---- Price "da €X" + details toggle ---- */
.jet-price-more {
  width: 100%;
}

.jet-price-more > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.jet-price-more > summary::-webkit-details-marker {
  display: none;
}

.jet-price-from {
  font-weight: 700;
  white-space: nowrap;
}

.jet-price-more > summary::after {
  content: '▾';
  font-size: 0.75em;
  opacity: 0.7;
}

.jet-price-more[open] > summary::after {
  content: '▴';
}

.jet-price-variants {
  margin-top: 0.35rem;
}

.jet-dish-details {
  margin: 0.25rem 0 0.15rem;
  font-size: 0.9em;
}

.jet-dish-details > summary {
  cursor: pointer;
  color: var(--primary-color, #4caf50);
  font-weight: 600;
  list-style: none;
}

.jet-dish-details > summary::-webkit-details-marker {
  display: none;
}

.jet-dish-details[open] > summary {
  margin-bottom: 0.25rem;
}

.jet-filter-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--container-bg, #fff);
  color: var(--text-color, #222);
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 560;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.jet-filter-chip i {
  font-size: 0.78rem;
  opacity: 0.85;
}

.jet-filter-chip:hover {
  border-color: var(--primary-color, #4caf50);
}

.jet-filter-chip.active {
  background: var(--primary-color, #4caf50);
  border-color: var(--primary-color, #4caf50);
  color: #fff;
}

.jet-filter-hidden,
.jet-filter-empty {
  display: none !important;
}
