.meal-detail-dialog,
.video-player-dialog {
  width: min(44rem, calc(100% - 2rem));
  max-height: min(48rem, calc(100dvh - 2rem));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-medium);
  color: var(--color-charcoal);
  background: var(--color-white);
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 25%);
}

.meal-detail-dialog::backdrop,
.video-player-dialog::backdrop,
.image-lightbox::backdrop {
  background: rgb(18 25 20 / 78%);
}

.meal-detail-dialog-shell,
.video-player-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: inherit;
}

.meal-detail-dialog-header,
.video-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 1.5rem);
  border-bottom: 1px solid var(--color-border);
}

.meal-detail-dialog-header h2,
.video-player-header h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.meal-detail-dialog-header button,
.video-player-header button,
.image-lightbox-close {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  flex: 0 0 2.75rem;
  place-items: center;
  padding: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  color: var(--color-charcoal);
  background: var(--color-white);
  cursor: pointer;
}

.meal-detail-dialog-header button .lucide-icon,
.video-player-header button .lucide-icon,
.image-lightbox-close .lucide-icon {
  width: 1.4rem;
  height: 1.4rem;
}

.meal-detail-dialog-body {
  padding: clamp(1rem, 3vw, 1.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.meal-browser-details > summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--color-green);
  border-radius: var(--radius-small);
  color: var(--color-green);
  background: transparent;
  font-weight: 800;
  line-height: 1.2;
  list-style: none;
  text-align: center;
  cursor: pointer;
}

.meal-browser-details > summary::-webkit-details-marker {
  display: none;
}

.meal-browser-details > summary:hover {
  color: var(--color-white);
  background: var(--color-green);
}

.meal-browser-details-content {
  display: grid;
  gap: 1rem;
  padding-block-start: 0.75rem;
}

.meal-browser-details-content h3 {
  margin-block: 0 0.5rem;
  font-size: 1.15rem;
}

.meal-dialog-open,
.image-lightbox-open,
.video-dialog-open {
  overflow: hidden;
}

.image-zoom-trigger {
  cursor: zoom-in;
}

.image-zoom-trigger:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 4px;
}

.image-lightbox {
  width: min(92rem, calc(100% - 1rem));
  max-width: none;
  height: calc(100dvh - 1rem);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: var(--color-white);
  background: transparent;
}

.image-lightbox-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 4rem 1rem 1rem;
}

.image-lightbox-close {
  position: absolute;
  z-index: 2;
  top: 0.75rem;
  right: 0.75rem;
  border-color: rgb(255 255 255 / 60%);
  box-shadow: 0 0.35rem 1rem rgb(0 0 0 / 30%);
}

.image-lightbox figure {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.75rem;
  place-items: center;
}

.image-lightbox img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 38%);
}

.image-lightbox figcaption {
  max-width: 70rem;
  color: var(--color-white);
  font-size: 0.9rem;
  text-align: center;
}

.video-player-dialog {
  width: min(62rem, calc(100% - 2rem));
}

.video-player-body {
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-player-body :is(video, iframe) {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}
