/*
 * ⋯ menus ($store.menu: layouts/partials/ui + menu-rows) and the hidden-post panel (components/post-card).
 * Desktop: a Facebook-style dropdown under the ⋯ button. Phones: a bottom sheet with the same rows.
 */

.scrim.is-clear { background: transparent; animation: none; }

.gmenu {
  position: fixed; z-index: 170; top: 0; left: 0;
  width: 344px; max-width: calc(100vw - 16px); overflow-y: auto; overscroll-behavior: contain;
  padding: 8px; border-radius: 12px; background: var(--bg-menu, var(--bg-surface));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
  transform-origin: var(--gmenu-origin, 90%) top;
  animation: gmenu-in 140ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  color: var(--text-primary); font-family: var(--font-ui);
}
.gmenu.is-up { transform-origin: var(--gmenu-origin, 90%) bottom; }
[data-theme="dark"] .gmenu { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06); }
@media (prefers-color-scheme: dark) { [data-theme="system"] .gmenu { box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06); } }
@keyframes gmenu-in { from { opacity: 0; transform: scale(0.96); } }
@media (prefers-reduced-motion: reduce) { .gmenu { animation: fade-in 120ms both; } }

.gmenu-sheet { padding: 0 8px calc(8px + env(safe-area-inset-bottom)); background: var(--bg-menu, var(--bg-surface)); }
.gmenu-sheet .gmenu-list { overflow-y: auto; min-height: 0; }

.gmenu-list { display: grid; }
.gmenu-cell { display: contents; }
.gmenu-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 10px;
  border-radius: 8px; text-align: left; color: var(--text-primary);
  font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}
.gmenu-row:hover, .gmenu-row:focus-visible { background: var(--bg-menu-hover, var(--bg-raised)); outline: none; }
.gmenu-row:focus-visible { box-shadow: inset 0 0 0 2px var(--brand-400); }
.gmenu-row.danger { color: var(--status-danger); }
.gmenu-row.strong .gmenu-label { font-weight: 700; color: var(--brand-400); }
.gmenu-ico { flex: none; width: 20px; height: 20px; display: grid; place-items: center; color: var(--text-primary); }
.gmenu-row.danger .gmenu-ico { color: var(--status-danger); }
.gmenu-ico .icon { width: 20px; height: 20px; }
.no-ico .gmenu-ico, .gmenu-ico:not(:has(svg)) { display: none; }
.gmenu-text { display: grid; min-width: 0; flex: 1; }
.gmenu-label { overflow: hidden; text-overflow: ellipsis; }
.gmenu-desc { font-size: 13px; line-height: 16px; font-weight: 400; color: var(--text-secondary); }
.gmenu-chev { flex: none; color: var(--text-secondary); }
.gmenu-sep { height: 1px; margin: 6px 10px; background: var(--border-subtle); }
.gmenu-title { padding: 8px 10px 10px; display: grid; gap: 4px; }
.gmenu-title h2 { font-size: 17px; line-height: 22px; font-weight: 700; }
.gmenu-title p { font-size: 14px; line-height: 19px; color: var(--text-secondary); }
.gmenu-sheet .gmenu-title { padding: 12px 12px 8px; }
.gmenu-head { display: flex; align-items: center; gap: 6px; padding: 0 2px 6px; margin-bottom: 4px; border-bottom: 1px solid var(--border-subtle); }
.gmenu-head strong { font-size: 17px; font-weight: 700; }
.gmenu-back { width: 36px; height: 36px; margin: 0; }
.gmenu-cancel { justify-content: center; margin-top: 4px; border-top: 1px solid var(--border-subtle); border-radius: 0; color: var(--text-secondary); }
@media (min-width: 768px) { .gmenu-sheet { left: 50%; right: auto; width: 400px; transform: translateX(-50%); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; } }

/* --- Hidden post panel (✕ on a post) --------------------------------------------------------- */
.hide-panel { padding: 14px 16px 10px; display: grid; gap: 4px; color: var(--text-primary); }
.hide-panel-head { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border-subtle); }
.hide-panel-head .hide-ico { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-raised); }
.hide-panel-head div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.hide-panel-head strong { font-size: 15px; font-weight: 600; }
.hide-panel-head p { font-size: 13px; color: var(--text-secondary); }
.hide-panel h3 { font-size: 18px; line-height: 24px; font-weight: 600; margin: 6px 0 6px; }
.hide-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hide-chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: 999px;
  background: var(--bg-raised); color: var(--text-primary); font-size: 15px; font-weight: 500;
}
.hide-chip:hover { filter: brightness(0.96); }
[data-theme="dark"] .hide-chip:hover { filter: brightness(1.15); }
.hide-chip.is-on { background: var(--brand-100); color: var(--brand-400); box-shadow: inset 0 0 0 1px var(--brand-400); }
.hide-chip:focus-visible { outline: 2px solid var(--brand-400); outline-offset: 2px; }
.hide-thanks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; font-size: 13px; color: var(--text-secondary); }
.hide-thanks button { font-weight: 600; color: var(--brand-400); font-size: 13px; }
.hide-thanks button:hover { text-decoration: underline; }
.hide-steps { display: grid; margin: 0 -8px; }
.hide-steps button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px; border-radius: 8px;
  text-align: left; font-size: 15px; font-weight: 500; color: var(--text-primary);
}
.hide-steps button:hover, .hide-steps button:focus-visible { background: var(--bg-raised); outline: none; }
.hide-steps .icon { width: 22px; height: 22px; flex: none; }
.hide-steps .is-done { color: var(--text-secondary); }
.gmenu svg, .gmenu-sheet svg { fill: currentColor; }
/* Above the post window (85) and the reels viewer (150). */
.gmenu-scrim { z-index: 165; }
.sheet.gmenu-sheet { z-index: 170; }

/* --- Reels: the rare "✕ Not interested | ✓ Interested" bar (components/reel-ask-interest) ---------- */
.reel-ask { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; pointer-events: auto; }
.reel-ask-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 12px;
  border-radius: 10px; background: rgba(40, 40, 40, 0.55); color: #fff; font-size: 15px; font-weight: 500; white-space: nowrap; min-width: 0;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.reel-ask-btn:hover { background: rgba(60, 60, 60, 0.7); }
.reel-ask-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.reel-ask-btn .icon { width: 16px; height: 16px; }

/* ⋯ → Interested on a feed card: inline confirmation + "More like this" row (postCard.interested). */
.more-like { margin: 4px 12px 12px; padding: 10px 12px 12px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--bg-raised); color: var(--text-primary); }
.more-like-head { display: flex; align-items: center; gap: 10px; }
.more-like-head p { flex: 1; min-width: 0; margin: 0; display: grid; gap: 1px; font-size: 14px; line-height: 1.3; }
.more-like-head p span { font-size: 13px; color: var(--text-secondary); }
.more-like-check { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--status-success); color: #fff; }
.more-like-body h4 { margin: 12px 0 8px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.more-like-row { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.more-like-row::-webkit-scrollbar { display: none; }
.more-like-tile { position: relative; flex: none; width: 112px; aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; background: var(--bg-hover); scroll-snap-align: start; }
.more-like-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.more-like-tile:hover img { transform: scale(1.03); }
.more-like-tile:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.more-like-type { position: absolute; top: 6px; right: 6px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.more-like-author { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 11px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more-like-skel { display: flex; gap: 6px; }
.more-like-skel i { width: 112px; aspect-ratio: 4 / 5; border-radius: 8px; background: var(--bg-hover); animation: ml-pulse 1.2s ease-in-out infinite; }
@keyframes ml-pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .more-like-skel i { animation: none; } .more-like-tile img { transition: none; } }
