/* Gündəlik post photos (1–3), shared by /Gundelik and /Gundelik/Post. Markup: _FeedMedia.cshtml
   and feedMediaHtml() in feed-media.js, which must stay identical. */
.fm { position: relative; margin: 0 0 12px; border-radius: 10px; overflow: hidden; background: var(--panel-2, var(--line)); }
.fm-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.fm-track::-webkit-scrollbar { display: none; }
.fm-slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; }
.fm-slide img { display: block; width: 100%; height: 100%; object-fit: contain; }
.fm.fm-one .fm-slide img { height: auto; max-height: 70vh; }
.fm:not(.fm-one) .fm-track { aspect-ratio: 4 / 5; max-height: 560px; }
/* A post with a fixed shape (FeedPost.ImageRatio, since 2026-11-13): the box has the shape before
   the photos load, one size for every post; the photos already have that shape (cover only hides
   rounding). Posts without data-ratio keep the free shape above. */
.fm[data-ratio] { max-width: 480px; margin-left: auto; margin-right: auto; }
.fm[data-ratio] .fm-track, .fm.fm-one[data-ratio] .fm-track { max-height: none; }
.fm[data-ratio="1:1"] .fm-track { aspect-ratio: 1 / 1; }
.fm[data-ratio="4:5"] .fm-track { aspect-ratio: 4 / 5; }
.fm[data-ratio] .fm-slide img, .fm.fm-one[data-ratio] .fm-slide img { height: 100%; max-height: none; object-fit: cover; }
.fm-count { position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: 999px; font-size: 12px; color: #fff; background: rgba(0,0,0,.55); pointer-events: none; }
.fm-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.fm-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); box-shadow: 0 0 2px rgba(0,0,0,.4); }
.fm-dots i.on { background: #fff; }
.fm-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
          background: rgba(255,255,255,.85); color: #111; font-size: 20px; line-height: 32px; padding: 0; display: none; }
.fm-prev { left: 8px; }
.fm-next { right: 8px; }
@media (hover: hover) { .fm:hover .fm-nav { display: block; } }
.fm-nav[hidden] { display: none !important; }

/* Composer: picked photos before sending */
.cm-photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; }
.cm-photos:empty { display: none; }
.cm-thumb { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--line); }
.cm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-thumb button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0;
                   background: rgba(0,0,0,.6); color: #fff; font-size: 14px; line-height: 22px; cursor: pointer; }
.cm-add[hidden] { display: none; }
/* Composer layout (Index and Edit): the counter sits in the text box's bottom-right corner; one
   toolbar row under it, the card's full width: Şəkil + Kvadrat|Portret left (they wrap onto a
   second line on very narrow screens), the send button(s) right, never on a line of their own. */
.cm-field { position: relative; }
.cm-field textarea { padding-bottom: 24px; }
.cm-count { position: absolute; right: 10px; bottom: 7px; pointer-events: none; font-size: 11px; line-height: 1;
            color: var(--faint); font-variant-numeric: tabular-nums; }
.cm-bar { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; }
.cm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.cm-send { display: flex; gap: 8px; flex-shrink: 0; margin-left: auto; }
.cm-bar .btn-sm { --h: 34px; padding: 0 11px; font-size: 13.5px; white-space: nowrap; }
/* Phones up to ~400px: drop the send button's icon so the row still fits on one line; below
   ~340px Kvadrat|Portret wraps under Şəkil while the send button keeps its place on the right. */
@media (max-width: 400px) {
    .cm-bar .btn-sm { padding: 0 10px; }
    .cm-send .ic { display: none; }
}
/* In the toolbar the segments are words only, as in the app (the shape icons stay in the markup). */
.cm-bar .cm-ratio i { display: none; }
.cm-hint { margin-top: 6px; font-size: 12px; color: var(--faint); }
.cm-hint[hidden] { display: none; }
/* Composer: the photos' shape (Kvadrat / Portret) and the crop dialog (Cropper.js) */
.cm-ratio { display: inline-flex; align-items: stretch; gap: 2px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; box-sizing: border-box; }
.cm-ratio[hidden] { display: none; }
.cm-ratio button { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border: 0; border-radius: 999px; background: none;
                   color: var(--muted); font: inherit; font-size: 12.5px; line-height: 1; cursor: pointer; white-space: nowrap; }
.cm-ratio button.on { background: var(--accent); color: #fff; }
.cm-ratio button:disabled { opacity: .45; cursor: not-allowed; }
.cm-ratio button.on:disabled { opacity: 1; cursor: default; }
.cm-ratio i { display: inline-block; border: 1.5px solid currentColor; border-radius: 2px; }
.cm-ratio i.sq { width: 10px; height: 10px; }
.cm-ratio i.pt { width: 9px; height: 11.5px; }
.cm-crop { position: fixed; inset: 0; z-index: 10000; display: flex; flex-direction: column; background: #111; color: #fff;
           padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.cm-crop-head { padding: 12px 16px; font-size: 13px; text-align: center; color: rgba(255,255,255,.8); }
.cm-crop-stage { flex: 1; min-height: 0; position: relative; }
.cm-crop-stage img { display: block; max-width: 100%; }
.cm-crop-foot { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.cm-crop-foot .btn { flex: 1; max-width: 220px; justify-content: center; }
.cm-crop .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }

.cm-err { color: var(--bad, #c0392b); font-size: 13px; margin-top: 6px; }
.cm-err:empty { display: none; }

/* The author's menu on their own post (_FeedOwnMenu.cshtml / feedOwnMenuHtml) */
.pm { position: relative; margin-left: auto; flex-shrink: 0; }
.pm > summary { list-style: none; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.pm > summary::-webkit-details-marker { display: none; }
.pm > summary:hover, .pm[open] > summary { background: var(--panel-2, var(--line)); color: var(--text); }
.pm-menu { position: absolute; right: 0; top: 36px; z-index: 20; min-width: 160px; padding: 6px; border-radius: 12px; background: var(--panel, #fff); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.pm-menu a, .pm-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; text-decoration: none; }
.pm-menu a:hover, .pm-menu button:hover { background: var(--panel-2, var(--line)); }
.pm-menu button { color: var(--bad, #c0392b); }
.pm-menu form { margin: 0; }
.edited { color: var(--faint); }
.pm-menu a[href^="/Reports"] { color: var(--bad, #c0392b); }
