/* ═══════════════════════════════════════════
   GIEESK — Recipe covers (js/cover.js)
   A recipe with no photo, or one whose photo failed to load, gets a soft
   tile tinted by its cuisine instead of a broken-image icon. The hue comes
   in as --cv-h; lightness and saturation follow the theme.
═══════════════════════════════════════════ */
.gk-cover {
  --cv-a: hsl(var(--cv-h, 32) 34% 22%);
  --cv-b: hsl(calc(var(--cv-h, 32) + 22) 30% 11%);
  --cv-ink: hsl(var(--cv-h, 32) 60% 82%);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255,255,255,0.10), transparent 55%),
    linear-gradient(145deg, var(--cv-a), var(--cv-b));
  color: var(--cv-ink);
  user-select: none;
  -webkit-user-select: none;
}
/* A faint ring behind the emoji, so a lone glyph reads as a plate. */
.gk-cover::before {
  content: "";
  position: absolute;
  width: 62%; aspect-ratio: 1; max-width: 220px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: .14;
  pointer-events: none;
}
.gk-cover-emoji {
  position: relative;
  font-size: var(--cv-emoji, 2rem);
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.28));
}
.gk-cover-cap {
  position: relative;
  font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  opacity: .7;
}

html[data-theme="light"] .gk-cover {
  --cv-a: hsl(var(--cv-h, 32) 62% 90%);
  --cv-b: hsl(calc(var(--cv-h, 32) + 22) 55% 80%);
  --cv-ink: hsl(var(--cv-h, 32) 45% 28%);
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255,255,255,0.65), transparent 55%),
    linear-gradient(145deg, var(--cv-a), var(--cv-b));
}
html[data-theme="light"] .gk-cover-emoji { filter: drop-shadow(0 3px 6px rgba(80,50,10,.18)); }

/* Sizes */
.gk-cover--xs   { --cv-emoji: 1.05rem; border-radius: 4px; gap: 0; }
.gk-cover--xs::before, .gk-cover--sm::before, .gk-cover--chip::before { display: none; }
.gk-cover--sm   { --cv-emoji: 1.35rem; gap: 0; }
.gk-cover--chip { --cv-emoji: 1.6rem; width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; gap: 0; }
.gk-cover--md   { --cv-emoji: 2.6rem; }
.gk-cover--lg   { --cv-emoji: 4rem; }
.gk-cover--post { --cv-emoji: 3.4rem; height: 190px; }
.gk-cover--hero { --cv-emoji: 5.2rem; height: 280px; border-radius: var(--r-xl) var(--r-xl) 0 0; }
.gk-cover--video{ --cv-a: #2a2824; --cv-b: #121110; --cv-ink: #d9d2c2; }
html[data-theme="light"] .gk-cover--video { --cv-a: #EDE6D6; --cv-b: #D8CFBA; --cv-ink: #6b5f45; }

/* Inside the existing frames */
.recipe-card-img .gk-cover { position: absolute; inset: 0; }
.modal-recipe-hero-photo .gk-cover { height: 100%; border-radius: 0; }
.search-drop-thumb .gk-cover,
.app-search-result-thumb.gk-cover { border-radius: inherit; }
.app-search-result-thumb.gk-cover { width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; }
.planner-slot-thumb.gk-cover { width: 22px; height: 22px; display: flex; margin-bottom: 3px; }
.planner-picker-thumb.gk-cover { width: 36px; height: 36px; border-radius: var(--r-sm); flex-shrink: 0; }
.video-thumb.gk-cover, .up-tile > .gk-cover, .discover-tile > .gk-cover { width: 100%; height: 100%; }
.post-photo.gk-cover { width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .gk-cover { animation: gkCoverIn .35s ease both; }
  @keyframes gkCoverIn { from { opacity: 0; } to { opacity: 1; } }
}
