/* PROSPER Matchmaking — Phase B (design/11 sections 10/12, amendment 4A).
   Layered on styles.css + event.css + profile.css. Every rule here is
   additive and mm- prefixed; nothing restyles existing components. */

/* ---------- title ---------- */
.hollow-mm { color: transparent; -webkit-text-stroke: 1.5px #cfe6ff; }

/* ---------- avatars ---------- */
.mm-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; vertical-align: middle; border: 1px solid var(--line); background: rgba(79, 195, 255, 0.08); }
.mm-avatar-sm { width: 24px; height: 24px; margin-right: 0.4rem; }
.mm-avatar-lg { width: 72px; height: 72px; }
.mm-avatar-symbol { display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; line-height: 1; }
.mm-avatar-lg.mm-avatar-symbol { font-size: 1.9rem; }

/* ---------- rank badges ---------- */
.mm-badge { display: inline-flex; align-items: center; gap: 0.45rem; vertical-align: middle; }
.mm-badge svg { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45)); }
.mm-badge--sm svg { width: 22px; height: 22px; }
.mm-badge--sm .mm-badge-name { font-size: 0.78rem; }
.mm-badge--lg svg { width: 54px; height: 54px; }
.mm-badge--lg .mm-badge-name { font-size: 1.05rem; }
.mm-badge-name { font-weight: 700; letter-spacing: 0.04em; color: var(--silver); white-space: nowrap; }
.mm-badge--bronze .mm-badge-name { color: #e2a06a; }
.mm-badge--silver .mm-badge-name { color: #eef4fb; }
.mm-badge--gold .mm-badge-name { color: #ffd166; }
.mm-badge--platinum .mm-badge-name { color: #bfe3ff; }
.mm-badge--diamond .mm-badge-name { color: #9be8ff; text-shadow: 0 0 10px rgba(79, 179, 221, 0.65); }
.mm-badge--diamond svg { filter: drop-shadow(0 0 9px rgba(79, 179, 221, 0.75)); }
.mm-badge--radiant .mm-badge-name {
  background: linear-gradient(100deg, #c9932b, #ffe9a8 45%, #fff7dd 55%, #c9932b);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: mmRadiantSheen 3.2s ease-in-out infinite;
}
.mm-badge--radiant svg { filter: drop-shadow(0 0 12px rgba(255, 214, 110, 0.8)); animation: mmRadiantPulse 2.6s ease-in-out infinite; }
@keyframes mmRadiantSheen { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }
@keyframes mmRadiantPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@media (prefers-reduced-motion: reduce) {
  .mm-badge--radiant .mm-badge-name, .mm-badge--radiant svg { animation: none !important; }
}

/* Section 18 custom emblems (mm-rank-badges.js): the .rb-icon svg fills
   the badge box the .mm-badge size variants define; the PROSPER
   Radiant emblem (.rb-radiant) gets a subtle shimmer — transform and
   opacity only — that fully disables under reduced motion. */
.rb-icon { display: block; width: 100%; height: 100%; }
.mm-badge svg.rb-radiant, .rb-radiant { animation: rbShimmer 3.4s ease-in-out infinite; }
@keyframes rbShimmer { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.9; } }
@media (prefers-reduced-motion: reduce) {
  .rb-radiant { animation: none !important; }
}

/* ---------- progression ---------- */
.mm-progress { height: 8px; background: rgba(174, 230, 255, 0.12); border-radius: 999px; overflow: hidden; margin-top: 0.7rem; max-width: 420px; }
.mm-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--sapphire), var(--ice)); border-radius: 999px; box-shadow: 0 0 12px rgba(140, 210, 255, 0.6); transition: width 0.6s ease; }
.mm-progress-label { color: var(--muted); font-size: 0.85rem; margin: 0.35rem 0 0; }

/* ---------- season / overview ---------- */
.mm-season h3 { margin-top: 0.4rem; }
.mm-prize-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.8rem; margin-top: 0.9rem; }
.mm-prize-spot { display: flex; align-items: center; gap: 0.6rem; border: 1px solid var(--line-soft); border-radius: 12px; padding: 0.6rem 0.75rem; background: rgba(10, 16, 26, 0.45); flex-wrap: wrap; }
.mm-prize-1 { border-color: rgba(255, 214, 110, 0.65); box-shadow: 0 0 18px rgba(255, 214, 110, 0.25); }
.mm-prize-2 { border-color: rgba(220, 232, 244, 0.55); }
.mm-prize-3 { border-color: rgba(205, 150, 90, 0.55); }
.mm-prize-place { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; color: var(--ice-soft); }
.mm-prize-amount { margin-left: auto; color: var(--ice-soft); font-weight: 700; }

/* ---------- mini cards / boards ---------- */
.mm-mini-head { display: flex; justify-content: space-between; align-items: center; }
.mm-pos { font-family: var(--font-display); font-weight: 900; font-size: 1.2rem; color: var(--ice-soft); }
.mm-mini-name { display: flex; align-items: center; gap: 0.55rem; font-size: 1.02rem; margin: 0.4rem 0; flex-wrap: wrap; }
.mm-top1 { border-color: rgba(255, 214, 110, 0.7) !important; box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.5), 0 0 26px rgba(255, 214, 110, 0.28) !important; }
.mm-top2 { border-color: rgba(220, 232, 244, 0.6) !important; }
.mm-top3 { border-color: rgba(205, 150, 90, 0.6) !important; }
.mm-board-row { cursor: pointer; }
.mm-board-row:hover td { background: rgba(110, 190, 255, 0.07); }
.mm-board td, .mm-board th { vertical-align: middle; }
.mm-move { font-size: 0.82rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.mm-move-up { color: var(--ok); }
.mm-move-down { color: var(--err); }
.mm-move-new { color: var(--ice-mid); letter-spacing: 0.08em; }
.mm-delta-up { color: var(--ok); font-weight: 700; }
.mm-delta-down { color: var(--err); font-weight: 700; }
.mm-scope { margin: 0.4rem 0 1rem; }

/* ---------- matches ---------- */
.mm-versus { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; font-weight: 600; margin: 0.35rem 0; }
.mm-versus > span { display: inline-flex; align-items: center; }
.mm-vs { color: var(--faint); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.75rem; }
.mm-result { color: var(--ice-soft); font-weight: 600; }
.mm-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.mm-accept-slot { display: inline-flex; }
.mm-picker { display: inline-flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin-top: 0.4rem; }
.mm-pick { display: inline-flex !important; align-items: center; gap: 0.35rem; margin: 0 !important; border: 1px solid var(--line-soft); border-radius: 999px; padding: 0.28rem 0.7rem; background: rgba(10, 18, 34, 0.55); cursor: pointer; }
.mm-pick input { width: auto; margin: 0; }
.mm-pick-search input { width: 220px; margin: 0; }
.mm-pick-chip { display: inline-flex; align-items: center; gap: 0.3rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.4rem 0.15rem 0.7rem; }
.mm-schedule { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; max-width: 100%; }
.mm-schedule input { flex: 1 1 120px; min-width: 0; width: auto; margin: 0; }
.mm-schedule .btn { flex: 0 0 auto; }
.mm-casual-report { display: inline-flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.mm-dispute-form { display: inline-flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.mm-dispute-form input { width: 260px; margin: 0; }
.mm-filters { display: flex; gap: 0.8rem; align-items: end; flex-wrap: wrap; margin-bottom: 1rem; }
.mm-filter-label { margin: 0; }
.mm-filter-label select, .mm-filter-label input { margin-top: 0.25rem; }
select, textarea {
  display: block; width: 100%; margin-top: 0.32rem; padding: 0.6rem 0.75rem;
  background: rgba(6, 10, 17, 0.75); border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  font: 400 0.95rem var(--font-ui);
}
select:focus, textarea:focus { outline: none; border-color: var(--ice-mid); box-shadow: 0 0 0 3px rgba(79, 195, 255, 0.22); }
.mm-pick select, .mm-guild-manage select { width: auto; margin: 0; padding: 0.3rem 0.5rem; }

/* ---------- gates / create panels ---------- */
.mm-gate { margin-bottom: 1.2rem; }
.mm-create { margin-bottom: 1.4rem; }
.mm-create h3 { margin-top: 0; }
.mm-create .field { display: block; margin: 0.75rem 0; color: var(--silver); font-size: 0.92rem; }

/* ---------- profile ---------- */
.mm-profile-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.mm-profile-head h3 { margin: 0; font-family: var(--font-ui); }
.mm-elo-big { font-family: var(--font-display); font-weight: 900; font-size: 1.7rem; color: var(--ice-soft); margin: 0.15rem 0 0; text-shadow: 0 0 16px rgba(174, 230, 255, 0.4); }
.mm-facts { margin-top: 1rem; }
.mm-rank-side { display: inline-block; vertical-align: middle; margin-left: 0.9rem; }
.mm-rank-side .mm-elo-big { font-size: 1.35rem; }

/* ---------- chart ---------- */
.mm-chart-wrap { border: 1px solid var(--line-soft); border-radius: var(--radius); background: rgba(8, 13, 22, 0.55); padding: 0.8rem; }
.mm-chart { width: 100%; height: 220px; display: block; }

/* ---------- guilds ---------- */
.mm-guild-head { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin: 0.6rem 0; }
.mm-guild-head h3 { margin: 0; font-family: var(--font-ui); }
.mm-guild-logo { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); background: rgba(79, 195, 255, 0.08); }
.mm-guild-logo-empty { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; color: var(--ice); }
.mm-logo-row { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; margin-top: 0.4rem; }
.mm-counter { font-weight: 700; color: var(--full); }
.mm-counter-ok { color: var(--ok); }
.mm-banner { border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem 0.95rem; background: rgba(79, 195, 255, 0.07); margin: 0.8rem 0; }
.mm-banner-warn { border-color: rgba(255, 194, 79, 0.55); background: rgba(255, 194, 79, 0.07); }
.mm-gate-list { border: 1px dashed var(--line); border-radius: 12px; padding: 0.9rem 1.1rem; margin: 0.9rem 0; background: rgba(10, 16, 26, 0.4); }
.mm-gate-list ul { margin: 0.4rem 0 0.8rem; padding-left: 1.2rem; }
.mm-guild-manage h4.event-subhead { margin-top: 1.3rem; }
.mm-guild-manage .team-roster li { margin: 0.35rem 0; }
.mm-guild-manage select[data-role-select] { margin-left: 0.5rem; }
.mm-pager { align-items: center; }
.mm-pager button:disabled { opacity: 0.45; cursor: default; }

@media (max-width: 760px) {
  .mm-versus { gap: 0.45rem; }
  .mm-dispute-form input, .mm-pick-search input { width: 100%; }
  .mm-schedule { flex-wrap: wrap; }
}

/* ---------- dual systems (amendments 16 + 17) ---------- */
.mm-sys-title { font-family: var(--font-display); letter-spacing: 0.04em; }
.mm-side { display: inline-flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.mm-side-elo { font-size: 0.78rem; color: var(--muted); display: inline-flex; align-items: center; gap: 0.3rem; }
.mm-side-elo .mm-badge svg { width: 18px; height: 18px; }
.mm-side-elo .mm-badge-name { font-size: 0.72rem; }
.mm-pools { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin: 0.6rem 0 1.2rem; }
.mm-pool h3 { margin-top: 0; }
.mm-pool-total { font-weight: 700; font-size: 1.15rem; }
.mm-pool-spots { list-style: none; margin: 0.6rem 0; padding: 0; display: grid; gap: 0.45rem; }
.mm-pool-spots li { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.mm-prize-tag { display: inline-block; padding: 0.08rem 0.5rem; border-radius: 999px; border: 1px solid rgba(255, 214, 110, 0.65); background: rgba(255, 214, 110, 0.1); color: #ffd66e; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.mm-prize-row { background: rgba(255, 214, 110, 0.05); }
.mm-pool-note { color: var(--muted); }

/* design/11 section 23 — ELO stakes + match results panel */
.mm-stakes { margin-top: .6rem; padding: .6rem .8rem; border: 1px solid rgba(140, 190, 255, .25); border-radius: .6rem; background: rgba(70, 130, 220, .07); font-size: .92rem; }
.mm-stakes p { margin: .15rem 0; }
.mm-stakes-title { font-weight: 600; letter-spacing: .02em; opacity: .9; }
.mm-result-panel { margin-top: .6rem; padding: .7rem .8rem; border: 1px solid rgba(255, 255, 255, .14); border-radius: .6rem; background: rgba(255, 255, 255, .03); }
.mm-result-panel.is-win { border-color: rgba(90, 220, 160, .55); }
.mm-result-panel.is-loss { border-color: rgba(255, 110, 110, .45); }
.mm-result-head { font-weight: 800; letter-spacing: .06em; margin: 0 0 .45rem; }
.mm-result-panel.is-win .mm-result-head { color: #5adca0; }
.mm-result-panel.is-loss .mm-result-head { color: #ff8f8f; }
.mm-result-panel.is-rank-change { animation: mm-rank-pulse 1.6s ease-in-out 2; }
@keyframes mm-rank-pulse { 0%, 100% { box-shadow: 0 0 0 rgba(255, 205, 90, 0); } 50% { box-shadow: 0 0 22px rgba(255, 205, 90, .55); } }
.mm-result-row { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: baseline; padding: .25rem 0; }
.mm-result-name { font-weight: 600; }
.mm-result-rank { opacity: .9; }
.mm-result-delta { font-weight: 800; margin-left: auto; animation: mm-delta-pop .8s ease-out 1; }
.mm-result-delta.is-plus { color: #5adca0; }
.mm-result-delta.is-minus { color: #ff8f8f; }
@keyframes mm-delta-pop { 0% { transform: scale(1.45); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mm-result-panel.is-rank-change, .mm-result-delta { animation: none; } }
