/*
 * rt-post-feed.css
 * ─────────────────────────────────────────────────────────────────────────────
 * Feed of post cards.
 * Scoped to .rt-post-feed and .rt-post.
 *
 * Figma reference: nodes 79:2015 (Post 1), 79:1909 (Post 2), 79:1841 (Post 3)
 * ─────────────────────────────────────────────────────────────────────────────
 * Feed wrapper:  flex-col  gap 20px
 * Post card:     655px wide  bg #fff  radius 10px  shadow card
 * Header:        px 24px  pt 20px  pb 0  flex row  align-items flex-start  gap 10px
 *   Avatar:      44×44px  radius 22px
 *   Author info: flex-col  gap 0  flex 1  min-width 0
 *     Name:      Inter SemiBold 14px #111  lh normal  ls -0.28px
 *     Role:      Inter Medium 12px #585858  lh 16px  ls -0.24px
 *     Timestamp: Inter Regular 12px #585858  lh normal  ls -0.24px  + globe icon 12px  gap 3px
 *   Options btn: 24×24px  ml auto
 * Post body:     px 24px  mt 12px  (content text)
 *   Content:     Inter Regular 15px #111  lh 20px
 * Post image:    full width (no px)  mt 12px  max-height 500px (Post1) / 350px (Post3)  object-fit cover
 * Counts row:    px 24px  py 8px  flex row  justify space-between
 *   Like:        blue like icon 16px + count  Inter Medium 13px #585858  ls -0.26px  gap 5px
 *   Comments:    Inter Medium 13px #585858  ls -0.26px  gap 5px (· separator)
 * Divider:       1px solid #DBDBDC  mx 24px
 * Actions bar:   4 equal buttons  h 34px  flex row
 *   Each:        flex 1  flex row  align-items center  justify center  gap 5px
 *   Icon:        18×18px
 *   Label:       Inter Medium 15px #585858  lh 18px (Like/Unlike lh18, others lh normal)
 *   Like active: color #558AF5
 * ─────────────────────────────────────────────────────────────────────────────
 */

.rt-post-feed,
.rt-post-feed * {
  box-sizing: border-box !important;
}

.rt-post-feed p,
.rt-post-feed p:last-child,
.rt-post-feed article p {
  margin-top:    0 !important;
  margin-bottom: 0 !important;
  padding-top:   0 !important;
  padding-bottom:0 !important;
}

.rt-post-feed ul,
.rt-post-feed ol,
.rt-post-feed li {
  list-style: none !important;
  margin:  0 !important;
  padding: 0 !important;
}

.rt-post-feed img {
  display: block;
  border: 0;
}

.rt-post-feed button {
  font-family: var(--rt-font-primary, 'Inter', sans-serif) !important;
  cursor: pointer;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
}

.rt-post-feed a {
  text-decoration: none;
  color: inherit;
}

/* ══════════════════════════════════════════════════════════════════════════
   Feed container
   ══════════════════════════════════════════════════════════════════════════ */

.rt-post-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;   /* 20px gap between cards (same as sidebar widget gap) */
  width: 100%;
  max-width: var(--rt-feed-max-width, 655px);
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-style: normal;
}

/* ══════════════════════════════════════════════════════════════════════════
   Individual post card
   ══════════════════════════════════════════════════════════════════════════ */

.rt-post {
  background-color: var(--rt-color-white, #ffffff);
  border-radius: var(--rt-radius-md, 10px);
  box-shadow: var(--rt-shadow-card, 0px 0px 20px 0px rgba(0, 0, 0, 0.05));
  /* Do NOT use overflow:hidden here — it clips absolutely-positioned
     dropdowns (mention, options menus). Image clipping is handled
     per-element with overflow:hidden + border-radius below. */
  display: flex;
  flex-direction: column;
}

/* ── Post header ─────────────────────────────────────────────────────────── */
.rt-post__header {
  display: flex;
  align-items: flex-start;
  gap: 10px;            /* avatar 44px + ~10px gap + author info */
  padding: 20px 24px 0; /* pt 20px, px 24px (= 53px from card left - 29px... Figma uses 53px from center column edge; we use 24px card-internal) */
}

.rt-post__avatar-wrap {
  flex-shrink: 0;
  width:  44px !important;
  height: 44px !important;
  border-radius: 50% !important;          /* Figma: radius 22px on a 44px square */
  overflow: hidden;            /* clip img/SVG fallback to the circle */
}

.rt-post__avatar {
  width:  100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

.rt-post__author-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rt-post__author-name {
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-size:   var(--rt-text-md, 14px);
  font-weight: var(--rt-fw-semibold, 600);
  line-height: var(--rt-lh-normal, normal);
  letter-spacing: var(--rt-ls-lg, -0.28px);
  color: var(--rt-color-text-primary, #111111);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rt-post__author-role {
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-size:   var(--rt-text-sm, 12px);
  font-weight: var(--rt-fw-medium, 500);
  line-height: var(--rt-lh-tight, 16px);
  letter-spacing: var(--rt-ls-sm, -0.24px);
  color: var(--rt-color-text-secondary, #585858);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rt-post__timestamp-row {
  display: flex;
  align-items: center;
  gap: 3px;   /* 3px gap between timestamp text and globe icon */
}

.rt-post__timestamp {
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-size:   var(--rt-text-sm, 12px);
  font-weight: var(--rt-fw-normal, 400);
  line-height: var(--rt-lh-normal, normal);
  letter-spacing: var(--rt-ls-sm, -0.24px);
  color: var(--rt-color-text-secondary, #585858);
  white-space: nowrap;
  text-decoration: none;
}

.rt-post__timestamp:hover {
  text-decoration: underline;
}

.rt-post__visibility-icon {
  flex-shrink: 0;
  width:  12px !important;
  height: 12px !important;
  display: block;
  color: var(--rt-color-text-secondary, #585858);
}

/* ── Options (3-dot) button ──────────────────────────────────────────────── */
.rt-post__options-wrap {
  position: relative;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;             /* optical alignment with avatar top */
}

.rt-post__options-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width:  24px;
  height: 24px;
  padding: 0 !important;
  margin:  0 !important;
  border:  none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--rt-color-text-secondary, #585858) !important;
  cursor: pointer;
}

.rt-post__options-btn:hover {
  color: var(--rt-color-text-primary, #111111) !important;
  background: transparent !important;
}

/* ── Options dropdown menu ───────────────────────────────────────────────── */
.rt-post__options-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: var(--rt-color-white, #ffffff);
  border: 1px solid var(--rt-color-divider, #dbdbdc);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  padding: 4px 0;
  margin: 0 !important;
  list-style: none !important;
  z-index: 200;
  display: none;
}

.rt-post__options-menu:not([hidden]) {
  display: block;
}

.rt-post__options-item {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px !important;
  text-align: left;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-family: var(--rt-font-primary, 'Inter', sans-serif) !important;
  font-size:   var(--rt-text-md, 14px) !important;
  font-weight: var(--rt-fw-normal, 400) !important;
  line-height: 20px !important;
  color: var(--rt-color-text-primary, #111111) !important;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 100ms ease;
}

.rt-post__options-item:hover {
  background: rgba(0, 0, 0, 0.04) !important;
}

.rt-post__options-item--danger {
  color: #d32f2f !important;
}

/* ── Post body ───────────────────────────────────────────────────────────── */
.rt-post__body {
  padding: 12px 24px 0;
}

.rt-post__content {
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-size:   var(--rt-text-lg, 15px);
  font-weight: var(--rt-fw-normal, 400);
  line-height: var(--rt-lh-base, 20px);
  color: var(--rt-color-text-primary, #111111);
  font-style: normal;
  /* Override Elementor / TwentyTwentyfour paragraph spacing */
  margin-top:    0 !important;
  margin-bottom: 0 !important;
  /* Allow inline avatar to sit on the baseline */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* Links inside UM activity content (author names, etc.) */
.rt-post__content .um-link {
  color: var(--rt-color-brand, #558af5);
  font-weight: var(--rt-fw-medium, 500);
  text-decoration: none;
}
.rt-post__content .um-link:hover {
  text-decoration: underline;
  color: var(--rt-color-brand, #558af5);
}

/* Inline avatar rendered by UM "has just followed" activity type */
.rt-post__content .gravatar,
.rt-post__content .um-avatar {
  width:  28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  margin: 0 !important;
}

/* ── Post image ──────────────────────────────────────────────────────────── */
.rt-post__image-wrap {
  margin-top: 16px;
  line-height: 0; /* removes inline gap below image */
}

.rt-post__image {
  width:  100% !important;
  max-width: 100% !important;
  max-height: 500px;       /* matches largest Figma post image (500px) */
  object-fit: cover;
  display: block;
  cursor: pointer;
}

/* ── Engagement counts row ───────────────────────────────────────────────── */
.rt-post__counts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;   /* py-8px, px same as content */
  margin-top: 8px;
}

.rt-post__likes-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  /* reset <button> chrome */
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  border-radius: 4px;
  transition: opacity 120ms ease;
}
.rt-post__likes-wrap:hover {
  opacity: 0.75;
}

.rt-post__like-icon {
  flex-shrink: 0;
  width:  16px !important;
  height: 16px !important;
  display: block;
}

.rt-post__like-count,
.rt-post__comment-count,
.rt-post__repost-count,
.rt-post__share-count,
.rt-post__dot {
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-size:   var(--rt-text-base, 13px);
  font-weight: var(--rt-fw-medium, 500);
  line-height: var(--rt-lh-normal, normal);
  letter-spacing: var(--rt-ls-md, -0.26px);
  color: var(--rt-color-text-secondary, #585858);
  white-space: nowrap;
}

.rt-post__comment-share-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Divider ─────────────────────────────────────────────────────────────── */
.rt-post__divider {
  height: 1px;
  background-color: var(--rt-color-divider, #dbdbdc);
  margin-inline: 24px;
  margin-bottom: 5px;          /* Figma: 5px gap between divider and action bar */
  margin-top: 5px;;
}

/* ── Action bar ──────────────────────────────────────────────────────────── */
.rt-post__actions {
  display: flex !important;    /* Elementor display:block override on div containers */
  align-items: stretch;
  padding-inline: 24px;        /* Figma: action row inset 23px from card edges */
  padding-bottom: 10px;        /* Figma: 10px gap between last button and card bottom */
}

.rt-post__action-btn {
  flex: 1;
  display: flex !important; /* Elementor button display override */
  align-items: center;
  justify-content: center;
  gap: 5px;            /* 5px gap between icon and label */
  height: 34px;
  padding: 0 !important;
  border: none !important;
  background-color: var(--rt-color-white, #ffffff) !important;
  box-shadow: none !important;
  color: var(--rt-color-text-secondary, #585858) !important; /* Elementor kit overrides button colour */
  font-size:   var(--rt-text-lg, 15px) !important;
  font-weight: var(--rt-fw-medium, 500) !important;
  line-height: 18px;   /* Figma: Like/Unlike uses lh 18px */
  cursor: pointer;
  transition: color 150ms ease;
  font-family: var(--rt-font-primary, 'Inter', sans-serif) !important;
  letter-spacing: normal;
  white-space: nowrap;
}

.rt-post__action-btn:hover {
  color: var(--rt-color-brand, #558af5) !important;
  background-color: var(--rt-color-white, #ffffff) !important;
}

/* ── Like button active state ────────────────────────────────────────────── */
.rt-post__like-btn--active {
  color: var(--rt-color-brand, #558af5) !important;
}

.rt-post__action-icon {
  flex-shrink: 0;
  width:  18px !important;
  height: 18px !important;
  display: block;
  fill: currentColor !important; /* Elementor SVG fill override */
  color: inherit !important;     /* propagate parent button colour to SVG */
  pointer-events: none;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 639px) {
  .rt-post-feed {
    max-width: 100%;
  }

  .rt-post__header,
  .rt-post__body,
  .rt-post__counts {
    padding-inline: 16px;
  }

  .rt-post__divider {
    margin-inline: 16px;
  }

  /* Compress action labels on very narrow screens */
  @media (max-width: 380px) {
    .rt-post__action-btn span {
      display: none;
    }

    .rt-post__action-btn {
      gap: 0;
    }
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   FEED STATES  (loading spinner, empty message, load-more)
   ═══════════════════════════════════════════════════════════════════════ */

.rt-post-feed__loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 24px;
}

.rt-post-feed__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--rt-color-divider, #DBDBDC);
  border-top-color: var(--rt-color-brand, #558AF5);
  border-radius: 50%;
  animation: rt-spin 0.8s linear infinite;
}

@keyframes rt-spin {
  to { transform: rotate(360deg); }
}

.rt-post-feed__empty {
  text-align: center;
  padding: 40px 24px;
  font-family: Inter, sans-serif;
  font-size: 14px;
  color: var(--rt-color-meta, #585858);
}

/* Invisible sentinel div — IntersectionObserver watches this to trigger
   automatic loading of the next page (infinite scroll). */
.rt-post-feed__sentinel {
  height: 1px;
  margin-top: 8px;
  visibility: hidden;
  pointer-events: none;
}

/* Show a centred spinner inside the sentinel while the next page loads. */
.rt-post-feed__sentinel[data-loading] {
  height: 48px;
  visibility: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rt-post-feed__sentinel[data-loading]::after {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--rt-color-divider, #DBDBDC);
  border-top-color: var(--rt-color-brand, #558AF5);
  border-radius: 50%;
  animation: rt-spin 0.8s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════════
   VIDEO EMBED
   ═══════════════════════════════════════════════════════════════════════ */

.rt-post__video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  margin-top: 12px;
  background: #000;
  overflow: hidden;
}

.rt-post__video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.rt-post__video-link {
  padding: 12px 24px;
  font-size: 14px;
}

.rt-post__video-link a {
  color: var(--rt-color-brand, #558AF5);
  word-break: break-all;
}

/* ═══════════════════════════════════════════════════════════════════════
   REPOST BLOCK
   ═══════════════════════════════════════════════════════════════════════ */

.rt-post__repost-block {
  position: relative;
  margin: 12px 24px 4px;
  border: 1px solid var(--rt-color-divider, #DBDBDC);
  border-radius: var(--rt-radius-md, 10px);
  background: var(--rt-color-white, #ffffff);
  box-shadow: var(--rt-shadow-card, 0px 0px 20px 0px rgba(0, 0, 0, 0.05));
  overflow: hidden;
}

.rt-post__repost-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 0;
  margin-bottom: 8px;
}

.rt-post__repost-avatar {
  width:  44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.rt-post__repost-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rt-post__repost-name {
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-size: var(--rt-text-base, 14px);
  font-weight: var(--rt-fw-semibold, 600);
  color: var(--rt-color-text-primary, #111111);
  line-height: 1.3;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rt-post__repost-role {
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-size: var(--rt-text-sm, 12px);
  font-weight: var(--rt-fw-normal, 400);
  color: var(--rt-color-meta, #585858);
  line-height: 1.3;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rt-post__repost-time {
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-size: var(--rt-text-sm, 12px);
  font-weight: var(--rt-fw-normal, 400);
  color: var(--rt-color-meta, #585858);
  line-height: 1.3;
  margin: 0;
}

.rt-post__repost-view-link {
  display: inline-block;
  margin: 8px 16px 14px;
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-size: var(--rt-text-sm, 12px);
  font-weight: var(--rt-fw-medium, 500);
  color: var(--rt-color-brand, #558AF5);
  text-decoration: none;
  line-height: 1.4;
}

.rt-post__repost-view-link:hover {
  text-decoration: underline;
}

.rt-post__repost-content {
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-size: var(--rt-text-lg, 15px);
  font-weight: var(--rt-fw-normal, 400);
  color: var(--rt-color-text-primary, #111111);
  line-height: var(--rt-lh-base, 20px);
  padding: 0 16px 16px;
  /* Inline UM activity content (e.g. "has just followed" with inline avatar) */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* UM author-name links inside repost content */
.rt-post__repost-content .um-link {
  color: var(--rt-color-brand, #558af5);
  font-weight: var(--rt-fw-medium, 500);
  text-decoration: none;
}
.rt-post__repost-content .um-link:hover {
  text-decoration: underline;
  color: var(--rt-color-brand, #558af5);
}

/* UM inline avatar (e.g. "has just followed <img>") inside repost content */
.rt-post__repost-content .gravatar,
.rt-post__repost-content .um-avatar {
  width:  28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  margin: 0 !important;
}

/* Image inside a repost block — no side radius, flush to edges */
.rt-post__repost-block .rt-post__image-wrap {
  margin-top: 0;
}
.rt-post__repost-block .rt-post__image {
  border-radius: 0 0 var(--rt-radius-md, 10px) var(--rt-radius-md, 10px);
  cursor: pointer;
}

/* Video upload block inside a repost — flush to edges, smaller min-height */
.rt-post__repost-block .rt-post__video-block {
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
  min-height: 160px;
  border-radius: 0 0 var(--rt-radius-md, 10px) var(--rt-radius-md, 10px);
}
.rt-post__repost-block .rt-post__video-thumb {
  border-radius: 0 0 var(--rt-radius-md, 10px) var(--rt-radius-md, 10px);
  max-height: 300px;
}
.rt-post__repost-block .rt-post__video-player {
  border-radius: 0 0 var(--rt-radius-md, 10px) var(--rt-radius-md, 10px);
  max-height: 300px;
}

/* YouTube/Vimeo/oEmbed wrap inside a repost */
.rt-post__repost-block .rt-post__video-wrap {
  margin: 8px 0 0;
  border-radius: 0 0 var(--rt-radius-md, 10px) var(--rt-radius-md, 10px);
  overflow: hidden;
}
.rt-post__repost-block .rt-post__video-wrap iframe {
  border-radius: 0 0 var(--rt-radius-md, 10px) var(--rt-radius-md, 10px);
}

/* ═══════════════════════════════════════════════════════════════════════
   COMMENTS SECTION
   ═══════════════════════════════════════════════════════════════════════ */

.rt-post__comments {
  padding: 0px 24px 16px;
}

.rt-post__comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.rt-post__load-more-comments {
  display: block !important;
  background: transparent !important;
  border: 0 !important;
  padding: 4px 0 !important;
  margin-bottom: 12px !important;
  min-width: 0 !important;
  box-shadow: none !important;
  font-family: Inter, sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--rt-color-meta, #585858) !important;
  cursor: pointer !important;
  text-align: left !important;
  line-height: 1.4 !important;
}

.rt-post__load-more-comments:hover {
  color: var(--rt-color-brand, #558AF5) !important;
}

/* ─── Comment item ─── */

.rt-comment {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* Highlight a specific comment when linked via ?comment_id= */
.rt-comment--highlight > .rt-comment__content > .rt-comment__bubble {
  outline: 2px solid var(--rt-color-brand, #558AF5);
  outline-offset: 2px;
  animation: rt-comment-highlight-fade 2.5s ease forwards;
}

@keyframes rt-comment-highlight-fade {
  0%   { outline-color: var(--rt-color-brand, #558AF5); }
  70%  { outline-color: var(--rt-color-brand, #558AF5); }
  100% { outline-color: transparent; }
}

.rt-comment__avatar {
  border-radius: 50% !important;
  aspect-ratio: 1 / 1;
  object-fit: cover !important;
  flex-shrink: 0;
}

.rt-comment__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rt-comment__bubble {
  background: var(--rt-bg-input, #f5f5f5);
  border-radius: 8px;
  padding: 8px 12px;
  position: relative;
}

.rt-comment__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.rt-comment__head-main {
  min-width: 0;
  flex: 1 1 auto;
}

.rt-comment__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.rt-comment .rt-comment__content .rt-comment__head-main p.rt-comment__position {
  margin: 3px 0 0 !important;
  margin-top: 3px !important;
  color: #585858;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.24px;
}

.rt-comment__author {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  line-height: 1.2;
}

.rt-comment__author a {
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  text-decoration: none;
}

.rt-comment__author a:hover {
  text-decoration: underline;
}

.rt-comment__time {
  font-family: Inter, sans-serif;
  font-size: var(--rt-text-sm, 12px) !important; 
  font-weight: var(--rt-fw-normal, 400) !important;
  letter-spacing: var(--rt-ls-sm, -0.24px) !important;
  color: var(--rt-color-text-secondary, #585858) !important;
  text-decoration: none;
  white-space: nowrap;
}

.rt-comment__time:hover {
  text-decoration: underline;
}

.rt-comment__text {
  font-family: Inter, sans-serif;
  font-size: 13px;
  color: #111;
  line-height: 1.5;
  word-break: break-word;
}

.rt-comment__text .um-link,
.rt-comment__text a {
  color: var(--rt-color-brand, #558af5) !important;
  font-weight: var(--rt-fw-medium, 500);
  text-decoration: none;
}
.rt-comment__text .um-link:hover,
.rt-comment__text a:hover {
  text-decoration: underline;
  color: var(--rt-color-brand, #558af5) !important;
}

/* ─── Comment input row ─── */

.rt-post__comment-input-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  position: relative;
}

.rt-post__comment-avatar {
  border-radius: 50% !important;
  aspect-ratio: 1 / 1;
  object-fit: cover !important;
  flex-shrink: 0;
  margin-top: 4px;
}

.rt-post__comment-field {
  flex: 1;
  min-height: 36px;
  padding: 8px 12px;
  font-family: Inter, sans-serif;
  font-size: 13px;
  color: #111;
  background: var(--rt-bg-input, #f5f5f5);
  border: 1px solid transparent;
  border-radius: 18px;
  outline: none;
  transition: border-color 150ms ease, background 150ms ease;
  cursor: text;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
  line-height: 1.5;
}

.rt-post__comment-field:empty::before {
  content: attr(data-placeholder);
  color: #111;
  opacity: 0.55;
  pointer-events: none;
}

.rt-post__comment-field:focus {
  background: #fff;
  border-color: var(--rt-color-divider, #DBDBDC);
}

/* Mention dropdown anchored to comment-input-row */
.rt-post__comment-mention-dropdown {
  position: absolute;
  z-index: 200;
  background: var(--rt-color-white, #ffffff);
  border: 1px solid var(--rt-color-border-light, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
  min-width: 200px;
}

.rt-post__comment-submit {
  flex-shrink: 0 !important;
  align-self: flex-end !important;
  padding: 5px 14px !important;
  background: var(--rt-color-brand, #558AF5) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 6px !important;
  font-family: Inter, sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background 150ms ease !important;
  box-shadow: none !important;
  min-width: 0 !important;
}

.rt-post__comment-submit:disabled {
  opacity: .5 !important;
  cursor: not-allowed !important;
}

.rt-post__comment-submit:not(:disabled):hover {
  background: var(--rt-color-brand-dark, #3a6fd4) !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   INLINE EDIT PANEL
   ═══════════════════════════════════════════════════════════════════════ */

.rt-post__edit-panel {
  padding: 16px 24px;
  border-top: 1px solid var(--rt-color-divider, #DBDBDC);
}

.rt-post__edit-field {
  width: 100%;
  padding: 12px;
  font-family: Inter, sans-serif;
  font-size: 15px;
  color: #111;
  border: 1px solid var(--rt-color-divider, #DBDBDC);
  border-radius: 6px;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color 150ms ease;
}

.rt-post__edit-field:focus {
  border-color: var(--rt-color-brand, #558AF5);
}

.rt-post__edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.rt-post__edit-cancel,
.rt-post__edit-save {
  padding: 7px 16px;
  border-radius: 20px;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 150ms ease;
}

.rt-post__edit-cancel {
  background: transparent;
  border-color: var(--rt-color-divider, #DBDBDC);
  color: var(--rt-color-meta, #585858);
}

.rt-post__edit-cancel:hover {
  background: #f5f5f5;
}

.rt-post__edit-save {
  background: var(--rt-color-brand, #558AF5);
  color: #fff;
}

.rt-post__edit-save:hover {
  background: var(--rt-color-brand-dark, #3a6fd4);
}

.rt-post__edit-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════
   LIKES MODAL
   ═══════════════════════════════════════════════════════════════════════ */

.rt-likes-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rt-likes-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.rt-likes-modal__box {
  position: relative;
  background: var(--rt-color-white, #ffffff);
  border-radius: var(--rt-radius-md, 10px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 400px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 16px;
}

.rt-likes-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rt-color-divider, #DBDBDC);
  flex-shrink: 0;
}

.rt-likes-modal__title {
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-size: var(--rt-text-sm, 15px) !important;
  font-weight: var(--rt-fw-semibold, 600);
  color: var(--rt-color-text-primary, #111111);
  margin: 0;
  line-height: 1.3;
}

.rt-likes-modal__close {
  background: none !important;
  border: 0 !important;
  padding: 4px !important;
  margin: 0 !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--rt-color-meta, #585858) !important;
  border-radius: 50% !important;
  transition: background 150ms ease;
  flex-shrink: 0;
}
.rt-likes-modal__close:hover {
  background: var(--rt-color-hover-bg, #f0f0f0) !important;
}

/* Scrollable user list */
.rt-likes-modal__list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  overflow-y: auto;
  flex: 1;
}

.rt-likes-modal__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  transition: background 120ms ease;
}
.rt-likes-modal__item:hover {
  background: var(--rt-color-hover-bg, #f5f5f5);
}

.rt-likes-modal__avatar {
  width:  40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.rt-likes-modal__name {
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-size: var(--rt-text-base, 14px);
  font-weight: var(--rt-fw-medium, 500);
  color: var(--rt-color-text-primary, #111111);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Infinite-scroll sentinel + spinner inside the modal */
.rt-likes-modal__sentinel {
  height: 1px;
  flex-shrink: 0;
}
.rt-likes-modal__sentinel[data-loading] {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rt-likes-modal__sentinel[data-loading]::after {
  content: '';
  display: block;
  width: 22px;
  height: 22px;
  border: 3px solid var(--rt-color-divider, #DBDBDC);
  border-top-color: var(--rt-color-brand, #558AF5);
  border-radius: 50%;
  animation: rt-spin 0.8s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════════
   SHARE MODAL
   ═══════════════════════════════════════════════════════════════════════ */

.rt-share-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rt-share-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.rt-share-modal__box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  width: min(480px, calc(100vw - 32px));
  overflow: hidden;
}

.rt-share-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--rt-color-divider, #DBDBDC);
}

.rt-share-modal__title {
  font-family: Inter, sans-serif;
  font-size: 16px !important;
  font-weight: 600;
  color: #111;
  margin: 0;
}

.rt-share-modal__close {
  background: transparent !important;
  border: 0 !important;
  padding: 4px !important;
  cursor: pointer !important;
  color: var(--rt-color-meta, #585858) !important;
  line-height: 0 !important;
  border-radius: 50%;
  transition: background 150ms ease;
}

.rt-share-modal__close:hover {
  background: #f5f5f5;
}

.rt-share-modal__body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rt-share-modal__label {
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--rt-color-meta, #585858);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.rt-share-modal__link-row {
  display: flex;
  gap: 8px;
}

.rt-share-modal__link-input {
  flex: 1;
  padding: 9px 12px;
  font-family: Inter, sans-serif;
  font-size: 13px;
  color: #111;
  background: #f5f7ff;
  border: 1px solid var(--rt-color-divider, #DBDBDC);
  border-radius: 6px;
  outline: none;
  cursor: text;
  min-width: 0;
}

.rt-share-modal__copy-btn {
  flex-shrink: 0;
  padding: 9px 18px;
  background: var(--rt-color-brand, #558AF5);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease;
}

.rt-share-modal__copy-btn:hover {
  background: var(--rt-color-brand-dark, #3a6fd4);
}

.rt-share-modal__social-row {
  display: flex;
  gap: 10px;
}

.rt-share-modal__social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 150ms ease;
  white-space: nowrap;
}

.rt-share-modal__social-btn:hover {
  opacity: 0.85;
}

.rt-share-modal__social-btn--facebook {
  background: #1877f2 !important;
  color: #fff !important;
}

.rt-share-modal__social-btn--twitter {
  background: #000 !important;
  color: #fff !important;
}

.rt-share-modal__social-btn--email {
  background: transparent !important;
  border: 1px solid var(--rt-color-divider, #DBDBDC) !important;
  color: #111 !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATION
   ═══════════════════════════════════════════════════════════════════════ */

.rt-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  padding: 12px 20px;
  border-radius: 8px;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease;
  white-space: nowrap;
}

.rt-notification--success { background: #22c55e; }
.rt-notification--error   { background: #ef4444; }
.rt-notification--info    { background: #558AF5; }

/* ═══════════════════════════════════════════════════════════════════════
   COMMENT INTERACTIONS  (actions, options menu, reply form, replies)
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Action bar ─── */
.rt-comment__actions {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px 0;
}

.rt-comment__action-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 3px 8px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 4px !important;
  font-family: Inter, sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--rt-color-meta, #585858) !important;
  cursor: pointer !important;
  transition: background 150ms ease, color 150ms ease !important;
  line-height: 1.4 !important;
  min-width: 0 !important;
  box-shadow: none !important;
}

.rt-comment__action-btn:hover {
  background: rgba(0,0,0,.05) !important;
  color: #111 !important;
}

.rt-comment__action-btn--active {
  color: var(--rt-color-brand, #558AF5) !important;
  font-weight: 600 !important;
}

.rt-comment__action-btn--reply,
.rt-comment__action-btn--reply:hover {
  color: #585858 !important;
  font-family: Inter, sans-serif !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 500 !important;
  line-height: normal !important;
  letter-spacing: -0.24px !important;
}

.rt-comment__action-sep {
  color: #585858;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -0.24px;
  -webkit-user-select: none;
  user-select: none;
}

.rt-comment__like-pill {
  display: inline-flex !important;
  align-items: center !important;
  padding: 2px 6px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-family: Inter, sans-serif !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  color: var(--rt-color-meta, #585858) !important;
  cursor: pointer !important;
  opacity: .75;
  transition: opacity 150ms ease, background 150ms ease !important;
  box-shadow: none !important;
  line-height: 1.4 !important;
}

.rt-comment__like-pill:hover {
  opacity: 1 !important;
  background: rgba(0,0,0,.05) !important;
}

/* ─── Options menu ─── */
.rt-comment__options-wrap {
  position: relative;
  flex: 0 0 auto;
}

.rt-comment__options-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 50% !important;
  color: var(--rt-color-meta, #585858) !important;
  cursor: pointer !important;
  transition: background 150ms ease !important;
  box-shadow: none !important;
  min-width: 0 !important;
}

.rt-comment__options-btn:hover {
  background: rgba(0,0,0,.06) !important;
}

.rt-comment__options-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 200;
  background: #fff;
  border: 1px solid var(--rt-color-divider, #DBDBDC);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  min-width: 130px;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  overflow: hidden;
}

.rt-comment__option-item {
  display: block !important;
  width: 100% !important;
  padding: 9px 16px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-family: Inter, sans-serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #111 !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: background 150ms ease !important;
  box-shadow: none !important;
  min-width: 0 !important;
}

.rt-comment__option-item:hover {
  background: #f5f5f5 !important;
}

.rt-comment__option-item--danger {
  color: #e53e3e !important;
}

/* ─── Inline reply form ─── */
.rt-comment__reply-form {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0 0;
  position: relative;
}

.rt-comment__reply-avatar {
  border-radius: 50% !important;
  aspect-ratio: 1 / 1;
  object-fit: cover !important;
  flex-shrink: 0;
  margin-top: 3px;
}

.rt-comment__reply-input-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rt-comment__reply-field {
  width: 100%;
  padding: 8px 12px;
  background: var(--rt-bg-input, #f5f5f5);
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: Inter, sans-serif;
  font-size: 13px;
  color: #111;
  line-height: 1.5;
  transition: border-color 150ms ease;
  outline: none;
  box-sizing: border-box;
  cursor: text;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  min-height: 37px;
}

.rt-comment__reply-field:empty::before {
  content: attr(data-placeholder);
  color: #111;
  opacity: 0.55;
  pointer-events: none;
}

.rt-comment__reply-field:focus {
  border-color: var(--rt-color-brand, #558AF5);
  background: #fff;
}

/* ─── Reply mention dropdown ─── */
.rt-comment__reply-mention-dropdown {
  position: absolute;
  z-index: 200;
  background: var(--rt-color-white, #ffffff);
  border: 1px solid var(--rt-color-border-light, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
  min-width: 200px;
}

.rt-comment__reply-submit {
  align-self: flex-end !important;
  padding: 5px 14px !important;
  background: var(--rt-color-brand, #558AF5) !important;
  border: 0 !important;
  border-radius: 6px !important;
  font-family: Inter, sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #fff !important;
  cursor: pointer !important;
  transition: background 150ms ease !important;
  box-shadow: none !important;
  min-width: 0 !important;
  display: none !important;
}

.rt-comment__reply-form:focus-within .rt-comment__reply-submit,
.rt-comment__reply-form--has-text .rt-comment__reply-submit {
  display: inline-flex !important;
}

.rt-comment__reply-submit:hover {
  background: var(--rt-color-brand-dark, #3a6fd4) !important;
}

/* Reply composer tools (emoji + photo) row, mirroring the comment composer. */
.rt-comment__reply-input-wrap { position: relative; }
.rt-comment__reply-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rt-comment__reply-actions .rt-post__comment-tools { margin-left: -4px; }
/* Anchor the emoji panel above the emoji icon (left side of the reply row). */
.rt-comment__reply-tools-wrap { position: relative; }
.rt-comment__reply-form .rt-post__comment-emoji-panel {
  top: auto;
  bottom: calc(100% + 6px);
  left: 0;
  right: auto;
}
.rt-comment__reply-photo-preview { margin-left: 0 !important; }

.rt-comment__reply-submit:disabled {
  opacity: .5 !important;
  cursor: not-allowed !important;
}

/* ─── Replies section (depth-0 parent) ─── */
.rt-comment__replies-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
  padding-left: 14px;
  border-left: 2px solid var(--rt-color-divider, #DBDBDC);
  margin-left: 4px;
}

.rt-comment__view-replies {
  display: inline-flex !important;
  align-items: center !important;
  padding: 3px 8px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 4px !important;
  font-family: Inter, sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--rt-color-brand, #558AF5) !important;
  cursor: pointer !important;
  transition: background 150ms ease !important;
  box-shadow: none !important;
  min-width: 0 !important;
}

.rt-comment__view-replies:hover {
  background: rgba(85, 138, 245, .08) !important;
}

.rt-comment__view-replies:disabled {
  opacity: .6 !important;
  cursor: not-allowed !important;
}

.rt-comment__replies-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ─── Depth-1 (reply) tweaks ─── */.rt-comment--depth-1 .rt-comment__avatar {
  width: 28px !important;
  height: 28px !important;
}

.rt-comment--depth-1 .rt-comment__bubble {
  padding: 6px 32px 6px 10px;
}

.rt-comment--depth-1 .rt-comment__author a {
  font-size: 12px;
}

.rt-comment--depth-1 .rt-comment__text {
  font-size: 12px;
}
/* ═══════════════════════════════════════════════════════════════════════
   UPLOADED VIDEO BLOCK (type = video_upload)
   ═══════════════════════════════════════════════════════════════════════ */

.rt-post__video-block {
  position: relative;
  width: 100%;
  min-height: 200px;
  margin-top: 12px;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  line-height: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rt-post__video-thumb {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 10px;
  opacity: .9;
  transition: opacity 200ms ease;
}

.rt-post__video-block:hover .rt-post__video-thumb {
  opacity: .75;
}

/* Centred circular play button */
.rt-post__video-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: transform 150ms ease;
}

.rt-post__video-play-btn:hover {
  transform: scale(1.1);
}

.rt-post__video-play-btn svg {
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
}

/* Native <video> element that replaces the thumbnail on play */
.rt-post__video-player {
  display: block;
  width: 100%;
  max-height: 480px;
  border-radius: 10px;
  background: #000;
  outline: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   PHOTO LIGHTBOX
   ═══════════════════════════════════════════════════════════════════════ */

.rt-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rt-photo-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  cursor: pointer;
}

/* Centred card — white strip at top (author) + image below */
.rt-photo-lightbox__frame {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 760px;
  max-height: 92vh;
  margin: 16px;
  background: var(--rt-color-white, #ffffff);
  border-radius: var(--rt-radius-md, 10px);
  overflow: hidden;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.45);
}

/* ── Close button ── */
.rt-photo-lightbox__close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 2;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.55) !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  color: #fff !important;
  transition: background 150ms ease;
}
.rt-photo-lightbox__close:hover {
  background: rgba(0, 0, 0, 0.78) !important;
}
.rt-photo-lightbox__close svg path {
  fill: #fff !important;
}

/* ── Author strip ── */
.rt-photo-lightbox__author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--rt-color-divider, #DBDBDC);
}

.rt-photo-lightbox__avatar {
  width:  44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.rt-photo-lightbox__author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rt-photo-lightbox__name {
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-size: var(--rt-text-base, 14px);
  font-weight: var(--rt-fw-semibold, 600);
  color: var(--rt-color-text-primary, #111111);
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rt-photo-lightbox__role {
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-size: var(--rt-text-sm, 12px);
  font-weight: var(--rt-fw-normal, 400);
  color: var(--rt-color-meta, #585858);
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rt-photo-lightbox__time {
  font-family: var(--rt-font-primary, 'Inter', sans-serif);
  font-size: var(--rt-text-sm, 12px);
  font-weight: var(--rt-fw-normal, 400);
  color: var(--rt-color-meta, #585858);
  margin: 0;
  line-height: 1.3;
}

/* ── Image area (scrollable if taller than viewport) ── */
.rt-photo-lightbox__img-wrap {
  flex: 1;
  overflow-y: auto;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.rt-photo-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  width: 100%;
}

/* ══════════════════════════════════════════════════════════════════════════
   Comment sort toggle + emoji picker + photo (home feed + group discussions)
   ══════════════════════════════════════════════════════════════════════════ */

.rt-post__comments-sort {
  position: relative;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.rt-post__sort-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-family: var(--rt-font-primary, 'Inter', sans-serif) !important;
  font-size: 15px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -0.3px;
  color: #585858 !important;
  cursor: pointer;
  -webkit-appearance: none;
          appearance: none;
}
.rt-post__sort-trigger svg { color: #585858; flex: 0 0 auto; }
.rt-post__sort-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: auto;
  min-width: 168px;
  margin: 0 !important;
  padding: 6px !important;
  list-style: none !important;
  background: #ffffff;
  border: 1px solid #e4e6ea;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 10;
}
.rt-post__sort-menu[hidden] { display: none !important; }
.rt-post__sort-menu li { margin: 0 !important; list-style: none !important; }
.rt-post__sort-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  font-size: 13px;
  color: #1f2227 !important;
  cursor: pointer;
  -webkit-appearance: none;
          appearance: none;
}
.rt-post__sort-menu button:hover { background: #f1f2f4 !important; }

/* Comment composer: avatar + rounded pill box (field + inline emoji/photo icons) */
.rt-post__comment-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}
.rt-post__comment-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rt-post__comment-box {
  position: relative;
  flex: 1 1 auto;
  max-width: 848px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #707070;
  border-radius: 5px;
  background: var(--Base-White, #fff);
  box-shadow: 0 1px 2px 0 rgba(10, 13, 18, 0.05);   /* shadow-xs */
}
.rt-post__comment-box .rt-post__comment-field {
  flex: 1;
  background: transparent !important;
  padding: 0 !important;
  border: 0 !important;
  min-height: 22px;
  line-height: 22px;
  outline: none;
}
.rt-post__comment-tools {
  display: flex;
  gap: 2px;
  align-items: center;
  flex: 0 0 auto;
}
.rt-post__comment-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #6b7281;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
          appearance: none;
}
.rt-post__comment-tool:hover { background: #f1f2f4 !important; color: #16181d; }
.rt-post__comment-tool svg {
  width: 22px !important;
  height: 22px !important;
  display: block;
  pointer-events: none;
}

.rt-post__comment-emoji-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #e4e6ea;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  position: absolute;
  bottom: calc(100% + 8px);
  right: 8px;
  z-index: 9999;            /* sit above Elementor/theme stacking contexts */
  width: 252px;
  pointer-events: auto !important;
}
.rt-post__comment-emoji-panel[hidden] { display: none !important; }
.rt-post__comment-submit[hidden] { display: none !important; }

/* Photo preview sits below the pill, aligned past the avatar. */
.rt-post__comment-photo-preview { margin-left: 46px; }
.rt-post__comment-photo-preview[hidden] { display: none !important; }
.rt-post__comment-emoji {
  border: 0 !important;
  background: transparent !important;
  font-size: 20px;
  line-height: 1;
  padding: 4px !important;
  cursor: pointer;
  border-radius: 6px !important;
  pointer-events: auto !important;   /* never let a parent disable clicks */
}
.rt-post__comment-emoji:hover { background: #f1f2f4 !important; }

.rt-post__comment-photo-preview-inner {
  position: relative;
  display: inline-block;
  max-width: 160px;
}
.rt-post__comment-photo-preview-inner img {
  max-width: 160px;
  border-radius: 10px;
  display: block;
}
.rt-post__comment-photo-remove {
  position: absolute !important;
  top: -8px !important;
  right: -8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #16181d !important;
  color: #ffffff !important;
  font-family: Inter, sans-serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-shadow: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
  -webkit-appearance: none !important;
          appearance: none !important;
}
.rt-post__comment-photo-remove:hover {
  background: #000000 !important;
  color: #ffffff !important;
}

/* Photo rendered inside a posted comment */
.rt-comment__photo { margin-top: 6px; }
.rt-comment__photo img {
  max-width: 240px;
  border-radius: 10px;
  display: block;
}
/* ── Shared-from-group attribution + group single-post "Show all posts" ──── */
.rt-post__repost-group {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin: 0 0 12px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid var(--rt-color-divider, #DBDBDC) !important;
  font-family: Inter, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  color: #558AF5 !important;
  text-decoration: none !important;
  padding-top: 10px !important;
}
.rt-post__repost-group svg { color: #558AF5 !important; flex: 0 0 auto; }
.rt-post__repost-group span { color: #558AF5 !important; }
.rt-post__repost-group:hover span { text-decoration: underline; }

.rt-post-feed__show-all { margin-bottom: 16px; }
.rt-post-feed__show-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #1f2227 !important;
  text-decoration: none;
  box-shadow: var(--rt-shadow-card, 0 0 20px 0 rgba(0, 0, 0, 0.05));
}
.rt-post-feed__show-all-link:hover { background: #f3f4f6; }
