/* ===== FOOD SHORTS PAGE ===== */
html:has(body.shorts-page) {
  overflow: hidden;
}

body.shorts-page {
  background: #05130f;
  overflow: hidden;
  height: 100vh;
  height: 100svh;
}

/* ---- Top nav — floats over the video feed ---- */
.shorts-topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 16px 28px;
  background: linear-gradient(180deg, rgba(5, 19, 15, 0.75), transparent);
  pointer-events: none;
}

.shorts-topnav > * {
  pointer-events: auto;
}

.shorts-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(6px);
}

.shorts-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  letter-spacing: -0.01em;
}

.shorts-menu-link {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.14);
  padding: 9px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

/* ---- Feed: one full-viewport card per short, snap-scrolled ---- */
.shorts-feed {
  height: 100vh;
  height: 100svh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.shorts-feed::-webkit-scrollbar {
  display: none;
}

.short-card {
  position: relative;
  height: 100vh;
  height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #0a1e18;
}

.short-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.short-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 19, 15, 0.15) 0%,
    rgba(5, 19, 15, 0.15) 40%,
    rgba(6, 20, 16, 0.94) 100%
  );
  pointer-events: none;
}

/* ---- Center play/pause flash (shown briefly on tap) ---- */
.short-playstate {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.short-playstate .icon-play,
.short-playstate .icon-pause {
  width: 64px;
  height: 64px;
  padding: 17px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: scale(0.85);
}

.short-playstate.flash .icon-play:not([hidden]),
.short-playstate.flash .icon-pause:not([hidden]) {
  animation: shortPlaystateFlash 0.55s ease;
}

@keyframes shortPlaystateFlash {
  0% { opacity: 0; transform: scale(0.8); }
  25% { opacity: 1; transform: scale(1); }
  75% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}

.short-mute {
  position: absolute;
  top: calc(70px + env(safe-area-inset-top));
  right: 16px;
  z-index: 40;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: none;
  backdrop-filter: blur(6px);
}

.short-info {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 20px calc(30px + env(safe-area-inset-bottom));
  color: #fff;
}

.short-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 8px;
}

.short-caption {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(21px, 6vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 32ch;
  margin-bottom: 18px;
}

.short-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.short-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  transition: transform var(--dur-fast) var(--ease);
}

.short-cta:active {
  transform: scale(0.97);
}

.short-cta-menu {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
}

.short-cta-install {
  background: var(--primary);
  color: #fff;
}

/* ---- Sound permission prompt ---- */
.sound-prompt {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 19, 15, 0.55);
}

.sound-prompt[hidden] {
  display: none;
}

.sound-prompt-card {
  width: 100%;
  max-width: 320px;
  padding: 26px 22px 22px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  color: #fff;
}

.sound-prompt-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  color: var(--accent-light);
  margin-bottom: 6px;
}

.sound-prompt-card strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}

.sound-prompt-card > span {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  margin-bottom: 10px;
}

.sound-prompt-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.sound-prompt-actions .short-cta-install {
  justify-content: center;
}

.sound-prompt-skip {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px;
}

/* ---- Empty state (no shorts configured) ---- */
.shorts-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  padding: 32px;
  gap: 10px;
}

@media (min-width: 720px) {
  .short-card {
    align-items: center;
    justify-content: center;
  }

  .short-video {
    position: relative;
    width: auto;
    height: 88%;
    aspect-ratio: 9 / 16;
    border-radius: var(--radius-lg);
  }

  .short-scrim,
  .short-info {
    position: absolute;
    width: min(420px, 92vw);
    left: 50%;
    transform: translateX(-50%);
  }

  .short-scrim {
    height: 88%;
    border-radius: var(--radius-lg);
  }

  .short-info {
    bottom: 6%;
  }

  .short-mute {
    right: calc(50% - min(210px, 46vw) + 12px);
  }
}
