/**
 * Master Profile v2 — ProTeam tag + brand logo strip
 * Issue #8 redesign (2026-05-07): inline mark sequence (fork B).
 * Spec: docs/design-system-v2/master-profile-proteam-strip-redesign-2026-05-07.md
 * Tokens-only — no hardcoded colors (mask-image uses --color-black sentinel).
 */

/* Inline gold pill in name row — KEPT VERBATIM (Founder-approved). */
.mp-proteam-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-brand-accent);
  color: var(--color-brand-accent);
  background: transparent;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  line-height: 1;
  white-space: nowrap;
}

/* Inline mark sequence — continues the meta row vocabulary           */
/* (mono caption + glyph-sized marks separated by middots). No chips. */
.mp-proteam-strip {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin: 0;
  padding: 0;
  border: 0;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  min-height: 32px;
}

.mp-proteam-strip__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .mp-proteam-strip__label::before {
    content: "";
    width: var(--space-6);
    border-top: 1px solid var(--color-border);
  }
}

.mp-proteam-strip__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-5, 24px);
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* Frameless monochrome mark — Founder 2026-06-07 redesign (INK-DEV-PROTEAM-LOGOS).
   No chip/border: real wordmarks read as a clean logo strip. The mark is fit
   inside an invisible BOX bounded on BOTH axes (--proteam-box-h × --proteam-box-w)
   with object-fit: contain — Founder: "ограничивал и по высоте и по ширине".
   Bounding both axes normalises optical weight: a short wide wordmark (e.g. WJX,
   ~4.8:1) hits the width cap and shrinks in height instead of towering over a
   square glyph (e.g. Druid). Monochrome only (no brand colour). Top artists
   carry ≤6 brands, so the strip never overflows. */
.mp-proteam-logo {
  --proteam-box-h: 44px;
  --proteam-box-w: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--proteam-box-h);
  text-decoration: none;
  flex-shrink: 0;
  line-height: 0;
}

.mp-proteam-logo:focus-visible {
  outline: 2px solid var(--color-brand-accent);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* height:100% forces the mark to scale UP from its tiny intrinsic size
   (the source SVGs declare width/height ~28px, which `auto` would honour);
   max-width caps wide wordmarks so they shrink in height via object-fit
   instead of towering. Box-bounded on both axes → even optical weight. */
.mp-proteam-logo img,
.mp-proteam-logo svg {
  height: 100%;
  width: auto;
  max-width: var(--proteam-box-w);
  display: block;
  object-fit: contain;
}

/* Monochrome tint. Selectors are theme-scoped (html.{dark,light}-theme) so
   they outrank the global `.dark-theme img:not([data-no-dim])` dimming rule
   in design-system tokens.css (specificity 0,2,2 > 0,2,1). Collapse any
   source — coloured SVG or transparent PNG — to a flat silhouette.
   Dark theme → white mark, light theme → black mark. */
html.dark-theme .mp-proteam-logo img,
html.dark-theme .mp-proteam-logo svg {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
html.light-theme .mp-proteam-logo img,
html.light-theme .mp-proteam-logo svg {
  filter: brightness(0);
  opacity: 0.82;
}

/* Text fallback when SVG missing — read as caption, not a chip. */
.mp-proteam-logo--text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: inherit;
  white-space: nowrap;
}

/* No visual cap on the chip layout — wrap handles 5+ brands gracefully. */

.mp-proteam-strip__more {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.mp-proteam-strip__more:hover { color: var(--color-text); }
.mp-proteam-strip__more a {
  color: inherit;
  text-decoration: none;
}

/* Mobile: drop the cap, scroll horizontally with right-edge mask fade. */
@media (max-width: 767px) {
  .mp-proteam-strip { gap: var(--space-3); }
  /* Single-row slider — Founder 2026-06-07: wrapping to 2 rows looked broken.
     nowrap + horizontal scroll turns the strip into a swipeable slider. */
  .mp-proteam-strip__list {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(
      to right,
      var(--color-black) 0,
      var(--color-black) calc(100% - var(--space-8)),
      transparent 100%
    );
  }
  .mp-proteam-logo { flex-shrink: 0; }
  .mp-proteam-strip__list::-webkit-scrollbar { display: none; }
  .mp-proteam-strip__list > li:nth-child(n+5):not(.mp-proteam-strip__more) {
    display: list-item;
  }
  .mp-proteam-strip__more { display: none; }
}
