/* ── Base ── */
#shareupdate .modal-content, #newDiscussion .modal-content { border-radius: 14px; overflow: hidden; border: none; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
#shareupdate .modal-header-custom, #newDiscussion .modal-header-custom { padding: 18px 22px 14px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; }
#shareupdate .modal-body, #newDiscussion .modal-body { padding: 0; }

/* ── Audience bar ── */
.audience-bar { padding: 12px 20px; background: #fafafa; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 10px; }
.audience-label { font-size: 11px; color: #888; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.audience-btn { display: flex; align-items: center; gap: 6px; border: 1.5px solid #e0e0e0; border-radius: 20px; padding: 4px 12px 4px 8px; background: #fff; cursor: pointer; font-size: 13px; font-weight: 600; color: #333; transition: border-color .2s; }
.audience-btn:hover { border-color: #FF1C5A; }
.audience-btn .caret-icon { font-size: 10px; color: #aaa; margin-left: 2px; }

/* ── Audience notice ── */
.audience-notice { margin: 14px 20px 0; border-radius: 8px; padding: 9px 13px; font-size: 12px; line-height: 1.5; display: flex; align-items: flex-start; gap: 8px; }
.audience-notice.notice-everyone { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.audience-notice.notice-followers { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Composer ── */
.composer-area { padding: 14px 20px 0; position: relative; }
.mention-textarea-wrap { position: relative; }
#mention-display, #mention-display-discussion, #mention-display-comments, .mention-display-comments {
  min-height: 100px; max-height: 220px; overflow-y: auto;
  border: 1.5px solid #e0e0e0; border-radius: 10px;
  padding: 10px 12px; font-size: 14px; line-height: 1.6;
  color: #222; background: #fff; outline: none;
  white-space: pre-wrap; word-break: break-word; cursor: text;
  transition: border-color .2s;
}
#mention-display:focus, #mention-display-discussion:focus, #mention-display-comments:focus, .mention-display-comments:focus { border-color: #FF1C5A; }
#mention-display:empty:before, #mention-display-discussion:empty:before, #mention-display-comments:empty:before, .mention-display-comments:empty:before { content: attr(data-placeholder); color: #aaa; pointer-events: none; }
.mention-user, a.mention { color: #1d5ce3; font-weight: 600; }
.mention-hash, a.hashtag { color: #FF1C5A; font-weight: 600; }
#message-shareupdate, #message-shareupdate-discussion, #message-shareupdate-comments, .message-shareupdate-comments { display: none; }

/* ── Suggestion dropdown ── */
.mention-suggestions, .mention-suggestions-comments {
  position: fixed;
  z-index: 999999;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 260px;
  min-height: 44px;
  max-height: 280px;
  overflow-y: auto;
  display: none;
}
.mention-suggestions.active, .mention-suggestions-comments.active { display: block; }
.sug-item { display: flex; align-items: center; gap: 9px; padding: 8px 12px; cursor: pointer; font-size: 13px; transition: background .15s; }
.sug-item:hover, .sug-item.selected { background: #f5f5f5; }
.sug-avatar { width: 30px; height: 30px; border-radius: 50%; background: #eee; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #888; flex-shrink: 0; overflow: hidden; }
.sug-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sug-name { font-weight: 600; color: #333; font-size: 13px; }
.sug-username { font-size: 11px; color: #888; }

/* ── Char counter ── */
.char-counter-row { display: flex; justify-content: flex-end; padding: 4px 0 0; }
.charNum-shareupdate, .charNum-shareupdate-comments { font-size: 11px; color: #aaa; }
.charNum-shareupdate.warn, .charNum-shareupdate-comments.warn { color: #e67e22; }
.charNum-shareupdate.danger, .charNum-shareupdate-comments.danger { color: #FF1C5A; font-weight: 700; }

/* ── Quoted post ── */
.quoted-post-wrap { margin: 12px 20px 0; border: 1.5px solid #e8e8e8; border-radius: 10px; padding: 10px 12px; background: #fafafa; }
.quoted-label { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #aaa; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.quoted-inner { display: flex; gap: 10px; align-items: flex-start; }
.quoted-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #eee; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #999; font-size: 13px; }
.quoted-username { font-size: 12px; color: #333; }
.quoted-text { font-size: 12px; color: #666; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Chips ── */
.attachments-row { padding: 10px 20px 0; min-height: 0; }
.attach-chip { border: 1px solid #ebebeb; background-color: #f7f9fa; border-radius: 20px; padding: 4px 10px 4px 8px; font-size: 12px; color: #000; font-weight: 600; margin-bottom: 10px; }
.chip-type { font-size: 10px; margin-left: 10px; background: #fafafa; border-radius: 10px; padding: 1px 6px; color: #FF1C5A; text-transform: uppercase; letter-spacing: .04em; }
.chip-remove { cursor: pointer; color: #888; font-size: 1.6em; line-height: 1; margin-right: 5px; margin-top: 5px; float: right; }
.chip-remove:hover { color: #FF1C5A; }
.post-attachment__title {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    overflow: hidden;
    display: -webkit-box;
    float:left;
}

/* ── Image previews ── */
.image-previews { padding: 10px 20px 0; display: flex; flex-wrap: wrap; gap: 8px; min-height: 0; }
.img-thumb-wrap { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 2px solid #e0e0e0; }
.img-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.img-thumb-remove { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.55); color: #fff; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 11px; cursor: pointer; }

/* ── Footer toolbar ── */
.modal-footer-toolbar { padding: 14px 20px; border-top: 1px solid #f0f0f0; display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.toolbar-left { display: flex; align-items: center; gap: 8px; flex: 1; }
.lang-select { border: 1.5px solid #e9e9e9; font-weight: bold; border-radius: 50px; padding: 5px 8px; font-size: 12px; color: #FF1C5A; background: #fff; cursor: pointer; outline: none; }
.lang-select:focus { border-color: #FF1C5A; }
.add-more-btn { width: 30px; height: 30px; font-weight: bold; border-radius: 50%; border: 1.5px solid #e9e9e9; background: #fff; font-size: 18px; color: #FF1C5A; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color .2s, color .2s; line-height: 1; padding: 0; }
.add-more-btn:hover { border-color: #FF1C5A; color: #555; }
.post-btn { margin-left: auto; background: #FF1C5A; color: #fff; border: none; border-radius: 20px; padding: 8px 22px; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .2s; }
.post-btn:hover { background: #1d5ce3; }
.post-btn:disabled { background: #e0a09a; cursor: not-allowed; }

/* ── Sub-modals ── */
.sub-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200000; display: none; align-items: center; justify-content: center; }
.sub-modal-overlay.open { display: flex; }
.sub-modal { background: #fff; border-radius: 16px; width: 400px; box-shadow: 0 24px 60px rgba(0,0,0,.22); max-height: 500px; overflow-y: scroll; }
.sub-modal-header { padding: 16px 20px 12px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.sub-modal-header h3 { margin: 0; font-size: 15px; font-weight: 700; color: #1a1a1a; }
.sub-modal-close { background: none; border: none; font-size: 20px; color: #aaa; cursor: pointer; line-height: 1; padding: 0; }
.sub-modal-body { padding: 16px; }

/* Audience options */
.aud-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; cursor: pointer; transition: background .15s; border: 2px solid transparent; margin-bottom: 8px; }
.aud-option:hover { background: #f9f9f9; }
.aud-option.aud-active { border-color: #FF1C5A; background: #fff5f5; }
.aud-option-icon { width: 40px; height: 40px; background-color: #eee; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.aud-option-text strong { font-size: 14px; color: #222; display: block; }
.aud-option-text span { font-size: 12px; color: #888; }
.aud-option-check { margin-left: auto; color: #FF1C5A; font-size: 18px; opacity: 0; transition: opacity .15s; }
.aud-option.aud-active .aud-option-check { opacity: 1; }

/* Add-more options */
.addmore-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; cursor: pointer; transition: background .15s, border-color .15s; border: 1px solid #f0f0f0; margin-bottom: 8px; }
.addmore-option:hover { background: #f9f9f9; border-color: #FF1C5A; }
.addmore-icon { margin-right: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.8em; flex-shrink: 0; color: #FF1C5A; }
.addmore-option-text strong { font-size: 13px; color: #222; display: block; }
.addmore-option-text span { font-size: 11px; color: #aaa; }

/* Content type list */
.content-type-list { list-style: none; margin: 0; padding: 0; }
.content-type-list li { padding: 10px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; color: #333; display: flex; align-items: center; gap: 8px; transition: background .15s; }
.content-type-list li:hover { background: #f5f5f5; }

/* Content items */
.content-item-list { max-height: 230px; overflow-y: auto; }
.content-item { padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; color: #333; transition: background .15s; }
.content-item:hover { background: #f5f5f5; }
.content-item.selected-item { background: #fff5f5; color: #FF1C5A; font-weight: 700; }
.sub-modal-back { background: none; border: none; font-weight: bold; font-size: 13px; color: #FF1C5A; cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 0 0 10px; }
.sub-modal-back:hover { color: #888; }
.content-loading { text-align: center; padding: 24px; color: #aaa; font-size: 13px; }

/* Notification banners */
.notif-banner { margin: 10px 20px 0; border-radius: 8px; padding: 9px 13px; font-size: 12px; line-height: 1.5; background: #0891b2; color: #fff; }