/* Muppet Madness Forums 5.6 — native site style + Muppet Roles bridge.
 * Loaded after frontend.css. All selectors are scoped to the forum. */

.mmf-forum {
  font-family: inherit;
  color: var(--mmf-text);
  background: var(--mmf-bg);
}

/* Match the site's bento panels and focus behavior in both dark and Lite Mode. */
.mmf-forum .mmf-header,
.mmf-forum .mmf-topic,
.mmf-forum .mmf-form-card,
.mmf-forum .mmf-comment,
.mmf-forum .mmf-flair-picker,
.mmf-forum .mmf-login-prompt {
  border-color: var(--mmf-border);
  background-color: var(--mmf-surface);
  color: var(--mmf-text);
}

.mmf-forum .mmf-header {
  position: relative;
  overflow: hidden;
}
.mmf-forum .mmf-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--mmf-accent), transparent 75%);
  pointer-events: none;
}
.mmf-forum .mmf-topic {
  box-shadow: 0 8px 25px color-mix(in srgb, var(--mmf-text) 6%, transparent);
}
.mmf-forum .mmf-main-nav a.active {
  color: var(--mmf-accent);
}
.mmf-forum :is(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--mmf-accent);
  outline-offset: 3px;
}
.mmf-forum :is(input, select, textarea)::placeholder {
  color: var(--mmf-muted);
  opacity: .85;
}
.mmf-forum .mmf-primary-button {
  color: var(--mm-accent-contrast, #07120c);
}

/* Keep the avatar, author name and site-wide role pill together. */
.mmf-forum .mmf-author {
  min-width: 0;
  align-items: center;
}
.mmf-forum .mmf-author-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: 100%;
}
.mmf-forum .mmf-author-line {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 5px 8px !important;
  min-width: 0;
  max-width: 100%;
}
.mmf-forum .mmf-author-line > .mmf-author-name {
  display: inline-block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  line-height: 1.45;
}

/* The Muppet Roles plugin substitutes its own markup for the forum role.
 * PHP adds .mmf-role-badge to that actual badge rather than depending on a
 * particular MMR version/class. Theme tokens work when switching Lite Mode. */
.mmf-forum .mmf-author-line > .mmf-role-badge {
  --mmf-role-ink: var(--mmr-role-color, var(--mmr-badge-color, var(--mmr-color, var(--role-color, var(--mmf-fallback-role-color, var(--mmf-accent))))));
  display: inline-flex !important;
  position: relative;
  flex: 0 0 auto;
  align-items: center !important;
  justify-content: center;
  gap: 6px !important;
  width: auto !important;
  max-width: 100%;
  min-height: 25px;
  height: auto !important;
  margin: 0 !important;
  padding: 3px 9px 3px 4px !important;
  border: 1px solid color-mix(in srgb, var(--mmf-role-ink) 54%, var(--mmf-border)) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--mmf-role-ink) 12%, var(--mmf-surface)) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--mmf-role-ink) !important;
  font-family: inherit !important;
  font-size: 10px !important;
  font-style: normal !important;
  font-weight: 850 !important;
  letter-spacing: .035em !important;
  line-height: 1.15 !important;
  text-align: left;
  text-decoration: none !important;
  text-shadow: none !important;
  text-transform: uppercase !important;
  white-space: nowrap;
  vertical-align: middle;
}
/* If a roles integration supplies only the role label, retain the distinct
 * forum role colors and a readable pill in light and dark color schemes. */
.mmf-forum .mmf-author-line > .mmf-role-badge[data-mmf-role="owner"] {
  --mmf-fallback-role-color: #eeb44c;
}
.mmf-forum .mmf-author-line > .mmf-role-badge[data-mmf-role="moderator"] {
  --mmf-fallback-role-color: #38bdf8;
}
.mmf-forum .mmf-author-line > .mmf-role-badge[data-mmf-role="member"] {
  --mmf-fallback-role-color: #71c759;
}

/* Symbol/avatar displayed INSIDE the pill. Does not change badges on the
 * profile, site header, member directory, or achievement/flair cards. */
.mmf-forum .mmf-author-line > .mmf-role-badge > :is(i, b, .mmr-role-icon, .mmr-badge-icon, .mm-role-icon, .mm-role-badge-icon) {
  display: inline-grid !important;
  flex: 0 0 18px;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  place-items: center;
  border: 0 !important;
  border-radius: 50% !important;
  background: var(--mmf-role-ink) !important;
  box-shadow: none !important;
  color: var(--mmf-surface) !important;
  font-size: 10px !important;
  font-style: normal !important;
  font-weight: 900;
  line-height: 1 !important;
  text-shadow: none !important;
}
.mmf-forum .mmf-author-line > .mmf-role-badge > svg {
  display: inline-block;
  flex: 0 0 16px;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  color: currentColor;
  vertical-align: middle;
}
.mmf-forum .mmf-author-line > .mmf-role-badge > span:not(.mmr-role-icon):not(.mmr-badge-icon):not(.mm-role-icon):not(.mm-role-badge-icon) {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
  font: inherit !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
  white-space: inherit;
}
/* Forum achievement flair, when shown, should have the same size and spacing
 * without being conflated with the user's global Muppet Madness role. */
.mmf-forum .mmf-author-line > .mmf-user-flair {
  min-height: 24px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--flair-color) 12%, var(--mmf-surface));
  line-height: 1.2;
}

/* Smaller devices may wrap badge to its own line, never clip the username. */
@media (max-width: 600px) {
  .mmf-forum .mmf-author-line {
    gap: 4px 6px !important;
  }
  .mmf-forum .mmf-author-line > .mmf-role-badge {
    font-size: 9px !important;
    min-height: 24px;
    white-space: normal;
  }
  .mmf-forum .mmf-author-line > .mmf-role-badge > :is(i, b, .mmr-role-icon, .mmr-badge-icon, .mm-role-icon, .mm-role-badge-icon) {
    flex-basis: 17px;
    width: 17px !important;
    height: 17px !important;
  }
  .mmf-forum .mmf-author {
    align-items: flex-start;
  }
  .mmf-forum .mmf-author-line > .mmf-author-name {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Market 2.0: profile helper can wrap a purchased animated frame. */
.mmf-author .mmd-mm-avatar-shell{flex:0 0 auto;vertical-align:middle}
.mmf-author .mmd-mm-avatar-shell .mmf-avatar{margin:0!important;display:block}
