/* Community feed with real data: lists, photos, the post menu, dialogs and small notes.
   Class prefix fd- (feed data). Works with feed-plus.css and site.css. */

.fd-list{display:flex;flex-direction:column;gap:16px}
.fd-loading{padding:18px 4px;color:var(--muted);font-size:15px}
.fd-loadmore{align-self:center;margin:16px auto 0;display:flex}
.fd-empty{padding:22px;color:var(--muted);font-size:16px}
.fd-search-list{margin-top:14px}
.fd-single-bar{margin-top:16px}
.fd-single-box{margin-top:10px}
.fd-linkbtn{min-height:40px;padding:0 4px;border:0;background:none;color:var(--accent-deep);font-size:14px;font-weight:600;display:inline-flex;align-items:center;cursor:pointer}
.fd-linkbtn:hover{color:var(--ink)}
.fp-sortbar{align-items:center;gap:12px}
.fd-refresh{margin-right:auto}

/* names and avatars */
a.feed-name,a.cm-name{color:var(--ink)}
a.feed-name:hover,a.cm-name:hover{color:var(--accent-deep);text-decoration:underline}
.avatar.fd-av-img{overflow:hidden;background:var(--stone)}
.avatar.fd-av-img img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}

/* the post menu */
.feed-post-head{position:relative}
.fd-more{width:36px;height:36px;margin:-6px -8px -6px auto;border:0;border-radius:8px;background:none;color:var(--muted);display:inline-flex;align-items:center;justify-content:center;flex:none}
.feed-post-head .topic ~ .fd-more{margin-left:0}
.fd-more:hover,.fd-more[aria-expanded="true"]{background:var(--paper);color:var(--ink)}
.fd-more svg{width:20px;height:20px;fill:currentColor;stroke:none}
.fd-menu{position:absolute;z-index:30;right:0;top:40px;min-width:180px;padding:6px;border:1px solid var(--hair);border-radius:12px;background:var(--card);box-shadow:var(--lift-lg);display:flex;flex-direction:column}
.fd-menu-item{min-height:44px;padding:0 12px;border:0;border-radius:8px;background:none;text-align:left;font-size:15px;font-weight:500;color:var(--ink)}
.fd-menu-item:hover,.fd-menu-item:focus-visible{background:var(--stone)}
.fd-menu-item.is-danger{color:var(--accent-deep)}

/* photos, video and files on a post */
.fd-media{display:flex;flex-direction:column;gap:10px}
.fd-photos{display:grid;gap:6px;border-radius:12px;overflow:hidden}
.fd-photos-1{grid-template-columns:1fr}
.fd-photos-2,.fd-photos-4{grid-template-columns:1fr 1fr}
.fd-photos-3{grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr}
.fd-photos-3 .fd-photo:first-child{grid-row:span 2}
.fd-photo{position:relative;display:block;background:var(--stone);min-height:120px}
.fd-photos-1 .fd-photo{min-height:0}
.fd-photo img{width:100%;height:100%;max-height:520px;object-fit:cover;display:block}
.fd-photos-1 .fd-photo img{height:auto}
.fd-photo-more{display:none}
.fd-photo-count{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(20,18,16,.5);color:#fff;font-size:22px;font-weight:700}
.fd-video{width:100%;max-height:520px;border-radius:12px;background:#000}
.fd-media .filecard{align-self:flex-start;color:var(--ink)}
.fd-media .filecard:hover{border-color:var(--ink)}

/* comments */
.cm-to{font-size:13px;color:var(--muted)}
.cm-del{color:var(--muted)}
.cm-removed{padding:9px 14px;border-radius:14px;background:var(--paper);font-size:14px;color:var(--muted);font-style:italic}
.cm-item:has(> .cm-removed){flex-direction:column;gap:0}
.cm-item > .cm-removed + .cm-toggle{margin-left:0}

/* composer */
.fd-editing{margin-top:10px;padding:8px 12px;border-radius:10px;background:var(--accent-wash);color:var(--accent-deep);font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:space-between;gap:10px}
.composer-send{flex-wrap:wrap}
.composer-topic select.is-empty,.composer-topic select:has(option[value=""]:checked){color:var(--muted)}

/* busy topics */
.fd-busy-btn{width:100%;border:0;background:none;padding:0;text-align:left;color:var(--ink);cursor:pointer}
.fd-busy-btn:hover{color:var(--accent-deep)}

/* search suggestions picked with the arrow keys */
.search-suggest button.is-active{background:var(--stone)}
.search-head .fd-linkbtn{margin-left:auto}

/* saved page */
.sv-open{align-self:flex-start;font-size:14px;font-weight:600;color:var(--accent-deep);min-height:36px;display:inline-flex;align-items:center}
.sv-open:hover{color:var(--ink)}
.fd-gone{color:var(--muted);font-style:italic}

/* dialogs */
.fd-dialog-back{position:fixed;inset:0;z-index:95;background:rgba(20,18,16,.4);display:flex;align-items:center;justify-content:center;padding:16px}
.fd-dialog{width:100%;max-width:440px;max-height:calc(100vh - 32px);overflow:auto;padding:22px;border-radius:16px;background:var(--card);box-shadow:var(--lift-lg);display:flex;flex-direction:column;gap:12px}
.fd-dialog h2{font-size:26px;line-height:1.1}
.fd-dialog-sub{color:var(--muted);font-size:15px}
.fd-dialog-btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.fd-dialog-note{font-size:14px;color:var(--accent-deep)}
.fd-report{display:flex;flex-direction:column;gap:10px}
.fd-reasons{margin:0;padding:0;border:0;display:flex;flex-direction:column;gap:4px}
.fd-reason{min-height:44px;padding:0 12px;border:1px solid var(--hair);border-radius:10px;display:flex;align-items:center;gap:10px;font-size:15px;cursor:pointer}
.fd-reason:has(input:checked){border-color:var(--ink);background:var(--paper)}
.fd-reason input{width:18px;height:18px;accent-color:var(--accent)}
.fd-label{font-size:13px;font-weight:600}
.fd-textarea{width:100%;padding:10px 12px;border:1px solid var(--hair);border-radius:10px;background:var(--card);font:inherit;font-size:16px;resize:vertical}
.fd-textarea:focus{border-color:var(--ink);outline:0}
@media (max-width:640px){
  .fd-dialog-back{align-items:flex-end;padding:0}
  .fd-dialog{max-width:none;border-radius:18px 18px 0 0;padding:20px 16px calc(20px + env(safe-area-inset-bottom))}
  .fd-photo{min-height:90px}
}
.feed-side li .fd-busy-btn{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:15px;font-weight:500}

/* edit a post in place (ewm_23) */
.fd-edit{margin-top:12px;display:flex;flex-direction:column;gap:8px}
.fd-edit-text{min-height:120px;line-height:1.55}
.fd-edit-row{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:8px 16px}
.fd-edit-tbox{display:flex;flex-direction:column;gap:4px;min-width:0}
.fd-edit-topic{min-height:40px;max-width:100%;padding:0 32px 0 12px;border:1px solid var(--hair);border-radius:10px;background:var(--card);font:inherit;font-size:15px;color:var(--ink)}
.fd-edit-topic:focus{border-color:var(--ink);outline:0}
.fd-edit-left{font-size:13px;color:var(--muted)}
.post-body-spot{display:none}
.cm-edit{margin-top:6px;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.cm-edit .cm-input{flex:1 1 200px;min-width:0}
.cm-edited{font-style:italic}

/* boost likes dialog */
.fd-boost-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.fd-boost-field{display:flex;flex-direction:column;gap:4px;min-width:0}
.fd-boost-input{width:100%;min-height:44px;padding:0 12px;border:1px solid var(--hair);border-radius:10px;background:var(--card);font:inherit;font-size:16px;color:var(--ink)}
.fd-boost-input:focus{border-color:var(--ink);outline:0}
@media (max-width:420px){.fd-boost-grid{grid-template-columns:1fr 1fr}.fd-boost-grid .fd-boost-field:first-child{grid-column:1 / -1}}
