/* Extracted page-local CSS from pages/home.php. */
#socialNotificationToast,
  #notificationToast {
    z-index:2147483646 !important;
  }

/* Post text background palette and edit-media controls; preserves the existing card layout. */
.post-background-picker{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:8px 0;color:var(--text-muted,#667085);font-size:12px}
.post-bg-swatch{width:27px;height:27px;min-width:27px;border:1px solid rgba(100,116,139,.35);border-radius:50%;display:inline-flex;align-items:center;justify-content:center;padding:0;color:#344054;background:#fff;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.post-bg-swatch.is-selected{outline:2px solid var(--primary,#2563eb);outline-offset:2px}
.post-edit-media-tools{display:flex;flex-direction:column;gap:8px;margin:10px 0}
.post-edit-existing-media,.post-edit-media-preview{display:flex;gap:8px;flex-wrap:wrap}
.post-edit-media-item{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border:1px solid rgba(100,116,139,.25);border-radius:8px;font-size:12px}
.post-edit-media-item button{border:0;border-radius:50%;width:24px;height:24px;cursor:pointer}
#postRichEditor[style*="background-color: rgb(31, 41, 55)"],#postRichEditor[style*="#1f2937"]{color:#fff}

/* Cleaner text-only background chooser and clearly visible media controls. */
.post-background-picker{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:8px 10px;border:1px solid var(--border-color,rgba(100,116,139,.18));border-radius:12px;background:var(--surface-secondary,rgba(148,163,184,.06));margin:10px 0}
.post-background-label{font-weight:600;color:var(--text-color,var(--text-muted,#667085));margin-right:2px;white-space:nowrap}
.post-bg-swatch{width:30px;height:30px;min-width:30px;border-radius:9px;transition:transform .12s ease,outline-color .12s ease}
.post-bg-swatch:hover{transform:translateY(-1px)}
.post-bg-swatch.is-selected{outline:2px solid var(--primary,#2563eb);outline-offset:2px;box-shadow:0 0 0 4px rgba(37,99,235,.10)}
.post-edit-media-tools>label.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;align-self:flex-start;cursor:pointer}
.post-edit-existing-media{align-items:stretch;padding:9px;border:1px solid var(--border-color,rgba(100,116,139,.18));border-radius:10px;background:var(--surface-secondary,rgba(148,163,184,.04))}
.post-edit-media-heading{flex-basis:100%;font-size:12px;color:var(--text-muted,#667085);font-weight:600}
.post-edit-media-item{background:var(--surface,#fff);cursor:pointer}
.post-edit-media-item span{display:flex;flex-direction:column;gap:2px;min-width:0}
.post-edit-media-item small{max-width:210px;overflow-wrap:anywhere;color:var(--text-muted,#667085);font-size:11px}
.post-edit-media-item em{font-style:normal;color:#b42318;font-size:11px;font-weight:600}
.post-edit-media-item input{width:16px;height:16px;accent-color:#d92d20}
.post-edit-media-preview .post-edit-media-item{background:var(--surface-secondary,rgba(148,163,184,.08))}
.post-edit-media-preview .post-edit-media-item button{background:#fee4e2;color:#b42318;font-size:18px}

/* Visual previews in post-edit media picker: identify each file before removing it. */
.post-edit-existing-media,.post-edit-media-preview{align-items:flex-start}
.post-edit-media-item{position:relative;display:flex;align-items:flex-start;gap:8px;padding:8px;min-width:132px;max-width:190px;cursor:pointer}
.post-edit-media-item .post-edit-media-thumb-wrap{display:flex;flex-direction:column;gap:5px;width:112px;min-width:0}
.post-edit-media-thumb{display:block;width:112px;height:84px;object-fit:cover;border-radius:7px;background:#e5e7eb}
.post-edit-video-thumb{position:relative;display:block;width:112px;height:84px;overflow:hidden;border-radius:7px;background:#111827}
.post-edit-video-thumb img,.post-edit-video-thumb video{display:block;width:100%;height:100%;object-fit:cover}
.post-edit-video-thumb b,.post-edit-video-play{position:absolute;left:50%;top:42px;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:29px;height:29px;border-radius:50%;background:rgba(0,0,0,.72);color:#fff;font-size:13px}
.post-edit-media-thumb-wrap small{display:block;max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--text-muted,#667085)}
.post-edit-media-item em{align-self:flex-start;white-space:nowrap}
.post-edit-upload-status{font-size:11px;line-height:1.3;color:var(--text-muted,#667085);max-width:145px;overflow-wrap:anywhere}
.post-edit-upload-status.is-uploaded{color:#067647}.post-edit-upload-status.is-upload-error{color:#b42318}
.post-edit-media-remove{position:absolute;right:5px;top:5px;z-index:2;width:26px!important;height:26px!important;border-radius:50%;font-size:18px;background:#fee4e2;color:#b42318;box-shadow:0 1px 4px rgba(0,0,0,.18)}
.post-edit-existing-media .post-edit-media-item:has(input:checked){outline:2px solid #d92d20;background:#fff1f0}
.post-edit-existing-media .post-edit-media-item input{position:absolute;right:7px;top:7px;z-index:3}

/* Visual previews in post-edit media picker: identify each file before removing it. */
.post-edit-existing-media,.post-edit-media-preview{align-items:flex-start}
.post-edit-media-item{position:relative;display:flex;align-items:flex-start;gap:8px;padding:8px;min-width:132px;max-width:190px;cursor:pointer}
.post-edit-media-item .post-edit-media-thumb-wrap{display:flex;flex-direction:column;gap:5px;width:112px;min-width:0}
.post-edit-media-thumb{display:block;width:112px;height:84px;object-fit:cover;border-radius:7px;background:#e5e7eb}
.post-edit-video-thumb{position:relative;display:block;width:112px;height:84px;overflow:hidden;border-radius:7px;background:#111827}
.post-edit-video-thumb img,.post-edit-video-thumb video{display:block;width:100%;height:100%;object-fit:cover}
.post-edit-video-thumb b,.post-edit-video-play{position:absolute;left:50%;top:42px;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:29px;height:29px;border-radius:50%;background:rgba(0,0,0,.72);color:#fff;font-size:13px}
.post-edit-media-thumb-wrap small{display:block;max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--text-muted,#667085)}
.post-edit-media-item em{align-self:flex-start;white-space:nowrap}
.post-edit-upload-status{font-size:11px;line-height:1.3;color:var(--text-muted,#667085);max-width:145px;overflow-wrap:anywhere}
.post-edit-upload-status.is-uploaded{color:#067647}.post-edit-upload-status.is-upload-error{color:#b42318}
.post-edit-media-remove{position:absolute;right:5px;top:5px;z-index:2;width:26px!important;height:26px!important;border-radius:50%;font-size:18px;background:#fee4e2;color:#b42318;box-shadow:0 1px 4px rgba(0,0,0,.18)}
.post-edit-existing-media .post-edit-media-item:has(input:checked){outline:2px solid #d92d20;background:#fff1f0}
.post-edit-existing-media .post-edit-media-item input{position:absolute;right:7px;top:7px;z-index:3}

/* Post edit media: visual thumbnails for existing and newly selected files. */
.post-edit-media-grid,.post-edit-media-preview{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
.post-edit-existing-media-item,.post-edit-new-media-item{position:relative;display:block!important;width:142px;min-width:0;padding:8px!important;border:1px solid #d7dee8!important;border-radius:10px;background:#fff;cursor:pointer;overflow:hidden}
.post-edit-media-thumb-wrap{position:relative;display:flex!important;flex-direction:column;gap:5px;width:100%;min-width:0}
.post-edit-media-thumb{display:block;width:100%;height:96px;object-fit:cover;border-radius:6px;background:#e9edf3}
.post-edit-video-play{position:absolute;top:34px;left:56px;border-radius:50%;background:#111b;color:#fff;padding:5px 8px;font-size:15px}
.post-edit-media-filename,.post-edit-media-thumb-wrap small{display:block;max-width:100%;overflow-wrap:anywhere;font-size:11px;line-height:1.35}
.post-edit-media-item>input[type=checkbox]{position:absolute;right:7px;top:7px;z-index:2;width:18px;height:18px;accent-color:#dc2626}
.post-edit-media-item>em{display:block;margin-top:5px;font-size:12px;font-style:normal;color:#475569}
.post-edit-existing-media-item:has(.post-edit-remove-media-check:checked){border:2px solid #dc2626!important;background:#fff1f2}
.post-edit-existing-media-item:has(.post-edit-remove-media-check:checked)>em{color:#dc2626;font-weight:700}
.post-edit-upload-status{display:block;margin-top:5px;font-size:11px;overflow-wrap:anywhere}
.post-edit-upload-status.is-uploaded{color:#15803d}.post-edit-upload-status.is-upload-error{color:#b91c1c}
.post-edit-media-remove{position:absolute;right:5px;top:5px;border:0;border-radius:50%;width:25px;height:25px;background:#dc2626;color:white;font-size:18px;cursor:pointer}


/* Long post collapse — show ~2–3 lines then "მეტის ნახვა" */
.post-content.post-content-collapsed,
.shared-post-content.post-content-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  max-height: 4.8em; /* fallback ~3 lines */
}
.post-content.post-content-expanded,
.shared-post-content.post-content-expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  max-height: none;
  overflow: visible;
}
button.post-see-more {
  display: inline-block;
  margin: 0 18px 10px;
  padding: 0;
  border: 0;
  background: none;
  color: #65676b;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
button.post-see-more:hover { color: #1877f2; text-decoration: underline; }


/* Post body: selectable text; only real <a> are links */
.post-content{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;cursor:text;user-select:text;-webkit-user-select:text}
.post-content a{color:var(--link,#2563eb);text-decoration:underline;cursor:pointer;overflow-wrap:anywhere}
.post-content h1,.post-content .post-title{font-size:1.28em;line-height:1.3;font-weight:750;margin:0 0 .35em;white-space:pre-wrap}
.post-content .post-body-text{margin:0;white-space:pre-wrap}

/* First-line title (h1): large + bold, LEFT aligned — not full-post centered */
.post-content h1,
.post-content .post-title,
.shared-post-content h1 {
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  margin: 0 0 .35em;
  white-space: pre-wrap;
}
/* @mentions, #hashtags, links: always normal size — never inherit h1 / short-status scale */
.post-content .post-mention,
.post-content .post-hashtag,
.post-content a.post-hashtag,
.post-content h1 .post-mention,
.post-content h1 .post-hashtag,
.post-content h1 a,
.shared-post-content .post-mention,
.shared-post-content .post-hashtag {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
  letter-spacing: normal !important;
}
/* Disable legacy whole-post "short status" centering (mentions/hashtags looked huge) */
.post-content.post-content-short,
.shared-post-content.post-content-short {
  font-size: inherit;
  font-weight: inherit;
  text-align: inherit;
  letter-spacing: inherit;
  padding: inherit;
}
.post-rich-editor h1 {
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 700;
  margin: 0 0 .25em;
  line-height: 1.35;
  text-align: left;
}
.post-rich-editor .post-mention,
.post-rich-editor .post-hashtag {
  font-size: 14px !important;
  font-weight: 600 !important;
}

.post-content-linkable,.post-content[role=link]{cursor:text}
.shared-post-content{white-space:pre-wrap;overflow-wrap:anywhere}
.shared-post-content a{color:var(--link,#2563eb);text-decoration:underline}
.post-rich-editor{white-space:pre-wrap;overflow-wrap:anywhere;min-height:72px}
.post-rich-editor h1{font-size:1.28em;font-weight:750;margin:0 0 .25em;line-height:1.3}
