/* Round 272 (v1.86.9) — Community Feed media: photo strip, full-screen viewer, comment GIFs and the emoji picker.
 * Phones: the strip is 260 px high and swipes one photo at a time, with a "n / N" counter.
 * Laptops (760 px and up): 2 or 3 photos side by side; 4 or more show three at a time with arrow buttons. */

.fm-strip { position: relative; margin: 10px 0 0; }
.fm-strip [hidden] { display: none !important; }
.fm-track {
  display: flex; gap: 8px; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain; scrollbar-width: none;
}
.fm-track::-webkit-scrollbar { display: none; }
.fm-track:focus-visible { outline: 3px solid #c9a227; outline-offset: 2px; border-radius: 12px; }
.fm-slide { position: relative; flex: 0 0 84%; margin: 0; scroll-snap-align: start; border-radius: 12px; overflow: hidden; background: var(--acts-divider, #e8e2d6); }
.fm-strip.is-one .fm-slide { flex-basis: 100%; }
.fm-open { display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; }
.fm-open img { display: block; width: 100%; height: 260px; object-fit: cover; }
.fm-more {
  position: absolute; right: 10px; bottom: 10px; min-height: 44px; min-width: 44px; padding: 0 16px;
  border: 0; border-radius: 999px; background: rgba(20, 22, 28, 0.72); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.fm-bar { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; }
.fm-count { margin: 0; font-size: 0.9rem; color: var(--acts-muted, #6b6257); font-variant-numeric: tabular-nums; }
.fm-prev, .fm-next { display: none; }
.fm-strip button:disabled { opacity: 0.35; cursor: default; }

@media (min-width: 760px) {
  .fm-slide { flex-basis: calc((100% - 16px) / 3); }
  .fm-strip.is-few .fm-slide { flex-basis: calc((100% - 16px) / 3); }
  .fm-strip.is-one .fm-slide { flex-basis: 100%; }
  .fm-open img { height: 220px; }
  .fm-strip.is-one .fm-open img { height: auto; max-height: 420px; }
  .fm-strip:not(.is-few):not(.is-one) .fm-bar .fm-prev,
  .fm-strip:not(.is-few):not(.is-one) .fm-bar .fm-next {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px;
    border: 0; border-radius: 999px; background: var(--acts-divider, #e8e2d6); color: inherit; font-size: 1.4rem; cursor: pointer;
  }
  .fm-strip:not(.is-few):not(.is-one) .fm-bar { justify-content: center; }
}

/* full-screen viewer */
body.fm-locked { overflow: hidden; }
.fm-viewer {
  position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column;
  background: rgba(12, 14, 20, 0.96); color: #fff;
}
.fm-viewer [hidden] { display: none !important; }
.fm-v-top { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 6px 16px; }
.fm-v-count { margin: 0; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.fm-v-close {
  min-width: 44px; min-height: 44px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.fm-v-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; }
.fm-v-pic { flex: 1; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.fm-v-pic img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; will-change: transform; pointer-events: none; -webkit-user-drag: none; }
.fm-v-prev, .fm-v-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; min-width: 48px; min-height: 48px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.fm-v-prev { left: 8px; }
.fm-v-next { right: 8px; }
.fm-v-prev:disabled, .fm-v-next:disabled { opacity: 0.25; cursor: default; }
.fm-v-zoom { display: flex; justify-content: center; gap: 10px; padding: 10px 12px 16px; }
.fm-v-zoom button {
  min-width: 44px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; font: inherit; font-size: 1.1rem; cursor: pointer;
}
.fm-viewer button:focus-visible, .fm-emoji-pick:focus-visible, .fm-emoji-btn:focus-visible, .fm-open:focus-visible, .fm-more:focus-visible {
  outline: 3px solid #f2c94c; outline-offset: 2px;
}

/* comments: emoji-only text, GIFs, the picker */
.cf-c-emoji { font-size: 1.9rem; line-height: 1.25; }
.cf-c-gifbox { margin: 6px 0 0; }
.cf-c-gif { display: block; width: 100%; max-width: 280px; height: auto; border-radius: 10px; }
.cf-cform { flex-wrap: wrap; }
.cf-gif-add { display: flex; flex-direction: column; gap: 4px; flex-basis: 100%; margin: 6px 0; font-size: 0.85rem; }
.cf-gif-add input[type="file"] { min-height: 44px; max-width: 100%; }
.fm-emoji-btn {
  min-width: 44px; min-height: 44px; border: 0; background: none; font-size: 1.35rem; line-height: 1; cursor: pointer; border-radius: 10px;
}
.fm-emoji-pop {
  flex-basis: 100%; order: 10; width: 100%; max-height: 240px; overflow-y: auto; margin-top: 6px; padding: 8px;
  background: var(--acts-card, #fff); border: 1px solid var(--acts-divider, #e5ded2); border-radius: 12px;
}
.fm-emoji-h { margin: 4px 2px; font-size: 0.8rem; color: var(--acts-muted, #6b6257); }
.fm-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.fm-emoji-pick {
  min-width: 44px; min-height: 44px; border: 0; background: none; font-size: 1.4rem; line-height: 1; border-radius: 8px; cursor: pointer;
}
.fm-emoji-pick:hover { background: var(--acts-divider, #efe9dd); }

/* emoji reactions on a comment */
.fm-rx { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.fm-rx-f { margin: 0; }
.fm-rx-b, .fm-rx-p, .fm-rx-add > summary {
  display: inline-flex; align-items: center; gap: 4px; min-height: 36px; min-width: 44px; padding: 0 10px;
  border: 1px solid var(--acts-divider, #e5ded2); border-radius: 999px; background: var(--acts-card, #fff);
  font: inherit; font-size: 0.95rem; color: inherit; cursor: pointer; list-style: none;
}
.fm-rx-b.is-mine { border-color: #c9a227; background: rgba(201, 162, 39, 0.14); }
.fm-rx-b.is-static { cursor: default; }
.fm-rx-b b { font-weight: 600; font-variant-numeric: tabular-nums; }
.fm-rx-add > summary::-webkit-details-marker { display: none; }
.fm-rx-add[open] > summary { background: var(--acts-divider, #efe9dd); }
.fm-rx-pick { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.fm-rx-p { min-width: 44px; justify-content: center; font-size: 1.2rem; }
.fm-rx-b:focus-visible, .fm-rx-p:focus-visible, .fm-rx-add > summary:focus-visible, .fm-gs-open:focus-visible, .fm-gs-go:focus-visible,
.fm-gs-pick:focus-visible, .fm-gs-clear:focus-visible { outline: 3px solid #c9a227; outline-offset: 2px; }

/* GIF search in the comment box */
.fm-gif-row { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.fm-gs { flex-basis: 100%; }
.fm-gs-open, .fm-gs-go, .fm-gs-clear {
  min-height: 44px; padding: 0 14px; border: 1px solid var(--acts-divider, #e5ded2); border-radius: 999px;
  background: var(--acts-card, #fff); font: inherit; font-size: 0.9rem; color: inherit; cursor: pointer;
}
.fm-gs-panel { margin-top: 8px; padding: 10px; border: 1px solid var(--acts-divider, #e5ded2); border-radius: 12px; background: var(--acts-card, #fff); }
.fm-gs-panel[hidden], .fm-gs-chosen[hidden], .fm-gs-url { display: none; }
.fm-gs-lab { display: block; font-size: 0.85rem; margin-bottom: 6px; }
.fm-gs-q { display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 0 12px; border: 1px solid var(--acts-divider, #e5ded2); border-radius: 10px; font: inherit; }
.fm-gs-msg { margin: 6px 0; font-size: 0.85rem; color: var(--acts-muted, #6b6257); }
.fm-gs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.fm-gs-pick { min-height: 44px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--acts-divider, #efe9dd); cursor: pointer; }
.fm-gs-pick img { display: block; width: 100%; height: auto; }
.fm-gs-chosen { margin: 8px 0 0; font-size: 0.9rem; }
.fm-gs-clear { min-height: 36px; margin-left: 6px; }

/* a GIF off screen: its still frame */
img.cf-c-gif[hidden], canvas[hidden] { display: none !important; }
.cf-c-gif-still { display: block; width: 100%; max-width: 280px; height: auto; border-radius: 10px; }
