/* MxM — Global-Feed cards (Experience bundle + "joined MxM").
 * Glassy design system, loaded shell-wide. Self-contained: tokens + the reserve
 * chip are redeclared here so the cards render correctly in the feed even when
 * the Experiences page stylesheet isn't loaded. Day = default; Night = body.mxm-glassy-dark. */

.mxm-feedcard {
  --fc-glass: rgba(255, 255, 255, 0.60);
  --fc-glass-2: rgba(255, 255, 255, 0.48);
  --fc-border: rgba(255, 255, 255, 0.5);
  --fc-shadow: 0 10px 34px rgba(31, 38, 135, 0.14), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  --fc-text: #14182a;
  --fc-muted: #5b6178;
  --fc-accent: #2f38ff;
  --fc-accent2: #7c5cff;
  --fc-blur: blur(26px) saturate(180%);
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--fc-glass);
  backdrop-filter: var(--fc-blur);
  -webkit-backdrop-filter: var(--fc-blur);
  border: 1px solid var(--fc-border);
  box-shadow: var(--fc-shadow);
  color: var(--fc-text);
  margin-bottom: 16px;
}
body.mxm-glassy-dark .mxm-feedcard {
  --fc-glass: rgba(20, 22, 30, 0.58);
  --fc-glass-2: rgba(20, 22, 30, 0.5);
  --fc-border: rgba(255, 255, 255, 0.08);
  --fc-shadow: 0 10px 40px rgba(0, 0, 0, 0.42), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  --fc-text: #eef0f7;
  --fc-muted: #9aa1bd;
  --fc-accent: #8b95ff;
  --fc-accent2: #b76cff;
}
.mxm-feedcard a { text-decoration: none; }
.mxm-feedcard-accent {
  position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--fc-accent), var(--fc-accent2));
}
.mxm-feedcard--empty { padding: 16px 18px; color: var(--fc-muted); font-size: 14px; }

/* Head */
.mxm-feedcard-head { display: flex; align-items: center; gap: 11px; padding: 14px 16px 10px 20px; }
.mxm-feedcard-av { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: rgba(127,127,127,.15); box-shadow: 0 0 0 2px rgba(47,56,255,.25); }
.mxm-feedcard-av img { width: 100%; height: 100%; object-fit: cover; }
.mxm-feedcard-id { min-width: 0; flex: 1; }
.mxm-feedcard-name { display: block; font-weight: 750; font-size: 14.5px; color: var(--fc-text); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mxm-feedcard-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fc-muted); margin-top: 2px; flex-wrap: wrap; }
.mxm-feedcard-kicker { font-weight: 700; color: var(--fc-accent); letter-spacing: .01em; }
.mxm-feedcard-dot { opacity: .6; }
.mxm-feedcard-reserve { flex: 0 0 auto; }

/* Lead media */
.mxm-feedcard-media { display: block; aspect-ratio: 16/9; background: #0c0f1c center/cover no-repeat; }

/* Body */
.mxm-feedcard-body { padding: 12px 18px 4px 20px; }
.mxm-feedcard-title { margin: 0 0 5px; font-size: 18px; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.mxm-feedcard-title a { color: var(--fc-text); }
.mxm-feedcard-title a:hover { color: var(--fc-accent); }
.mxm-feedcard-city { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--fc-muted); margin-bottom: 6px; }
.mxm-feedcard-excerpt { margin: 0; font-size: 14px; line-height: 1.55; color: var(--fc-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mxm-feedcard-more { margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--fc-accent); }

/* CTA */
.mxm-feedcard-cta {
  display: inline-flex; align-items: center; gap: 7px; margin: 12px 18px 16px 20px;
  background: linear-gradient(135deg, var(--fc-accent), var(--fc-accent2)); color: #fff;
  padding: 9px 18px; border-radius: 11px; font-weight: 750; font-size: 13.5px;
  box-shadow: 0 8px 20px rgba(47,56,255,.28); transition: transform .12s, filter .12s;
}
.mxm-feedcard-cta:hover { filter: brightness(1.06); transform: translateY(-1px); color: #fff; }

/* "Joined MxM" card */
.mxm-feedcard--join { text-align: left; }
.mxm-feedcard--join .mxm-feedcard-accent { background: linear-gradient(180deg, var(--rc, var(--fc-accent)), var(--fc-accent2)); }
.mxm-feedcard-join-inner { display: flex; align-items: center; gap: 14px; padding: 16px 18px 16px 22px; }
.mxm-feedcard-join-av { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: rgba(127,127,127,.15); box-shadow: 0 0 0 3px var(--rc, var(--fc-accent)); }
.mxm-feedcard-join-av img { width: 100%; height: 100%; object-fit: cover; }
.mxm-feedcard-join-txt { min-width: 0; }
.mxm-feedcard-join-line { font-size: 16px; font-weight: 750; color: var(--fc-text); line-height: 1.3; }
.mxm-feedcard-join-line a { color: var(--fc-text); }
.mxm-feedcard-join-line a:hover { color: var(--fc-accent); }
.mxm-feedcard-join-line .mxm-feedcard-join-spark { color: var(--fc-accent2); }
.mxm-feedcard-join-sub { margin-top: 5px; }

/* Reserve chip (redeclared so it renders in the feed) */
.mxm-feedcard .mxm-exp-reserve-chip {
  --rc: var(--fc-muted);
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase;
  color: var(--fc-text);
  background: var(--fc-glass-2); backdrop-filter: blur(8px) saturate(160%); -webkit-backdrop-filter: blur(8px) saturate(160%);
  border: 1px solid var(--fc-border); padding: 2px 8px 2px 6px; border-radius: 999px;
}
.mxm-feedcard .mxm-exp-reserve-dot { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--rc); flex: 0 0 auto; box-shadow: 0 0 5px var(--rc); }
.mxm-feedcard .mxm-exp-reserve-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--rc); animation: mxmFcReservePulse 1.9s ease-out infinite; }
@keyframes mxmFcReservePulse { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mxm-feedcard .mxm-exp-reserve-dot::after { animation: none; } }

@media (max-width: 560px) {
  .mxm-feedcard-title { font-size: 16px; }
  .mxm-feedcard-cta { width: calc(100% - 38px); justify-content: center; }
  /* Stop the username truncating: let it wrap and drop the reserve chip to its
   * own line so the name gets the full width. */
  .mxm-feedcard-head { flex-wrap: wrap; }
  .mxm-feedcard-name { white-space: normal; overflow: visible; text-overflow: clip; }
  .mxm-feedcard-reserve { flex-basis: 100%; margin-left: 53px; margin-top: 2px; }
}

/* MxM feed cards are wrapped in .post-container > .post so the feed's
 * infinite-scroll ($('div.post:last')) can read their data-post-id and keep
 * paginating — but they must NOT inherit the default post chrome. */
.post.mxm-feedpost { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; }
.post.mxm-feedpost::before, .post.mxm-feedpost::after { display: none !important; }
.post.mxm-feedpost .mxm-feedcard { margin-bottom: 0; }
