/* ================================================================
   Masluland — Creator rank badge (Stage 4)
   Markup is rendered by ml_creator_badge() in masluland-core.
   Base rules = DARK appearance; html.light-theme = LIGHT (the default layer).
   בכיר / מומחה get the larger (--lg) treatment. RTL.
   ================================================================ */

.ml-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    vertical-align: middle;
    margin-inline-start: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    font-family: 'Rubik', sans-serif;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.55;
    white-space: nowrap;
    direction: rtl;
}
.ml-rank-badge__icon { font-size: 1em; line-height: 1; }
.ml-rank-badge__txt  { display: inline-block; }

/* ── Larger badge for בכיר / מומחה ── */
.ml-rank-badge--lg {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    gap: 4px;
}

/* ── Per-rank styling (DARK base) ── */
.ml-rank-badge--yotzer {
    color: #DDB88B;
    background: rgba(221,184,139,0.10);
    border: 1px solid rgba(221,184,139,0.30);
}
.ml-rank-badge--vatik {
    color: #f4e9d6;
    background: rgba(221,184,139,0.20);
    border: 1px solid rgba(221,184,139,0.45);
}
.ml-rank-badge--bachir {
    color: #1a1a1a;
    background: linear-gradient(135deg, #ecca86 0%, #DDB88B 100%);
    border: 1px solid rgba(221,184,139,0.6);
    box-shadow: 0 1px 4px rgba(221,184,139,0.30);
}
.ml-rank-badge--mumche {
    color: #2a1d02;
    background: linear-gradient(135deg, #f3cf6a 0%, #d79a35 60%, #c9892b 100%);
    border: 1px solid rgba(201,137,43,0.7);
    box-shadow: 0 1px 6px rgba(215,154,53,0.40);
}

/* ── Profile surface: a touch larger, sits on its own line under the name ── */
.ml-rank-badge--profile {
    margin-inline-start: 0;
    margin-top: 7px;
    font-size: 11px;
}
.ml-rank-badge--profile.ml-rank-badge--lg { font-size: 13px; }

/* ── Single-trail chip row: align with the meta chips ── */
.ml-rank-badge--single { margin-inline-start: 4px; }

/* ================================================================
   LIGHT THEME (default layer) — flip the subtle ranks to dark ink on
   light surfaces. The gradient ranks (בכיר/מומחה) carry their own bg, so
   they read well in both modes; only minor tuning here.
   ================================================================ */
html.light-theme .ml-rank-badge--yotzer {
    color: var(--ml-gold-dark, #8a5a1f);
    background: rgba(154,106,47,0.10);
    border-color: rgba(154,106,47,0.30);
}
html.light-theme .ml-rank-badge--vatik {
    color: #7a4f1e;
    background: rgba(154,106,47,0.16);
    border-color: rgba(154,106,47,0.42);
}
html.light-theme .ml-rank-badge--bachir {
    color: #2a1d02;
    background: linear-gradient(135deg, #e6bd72 0%, #cf9b3d 100%);
    border-color: rgba(154,106,47,0.55);
    box-shadow: 0 1px 4px rgba(154,106,47,0.22);
}
html.light-theme .ml-rank-badge--mumche {
    color: #2a1d02;
    background: linear-gradient(135deg, #f0c75e 0%, #cf932f 100%);
    border-color: rgba(154,106,47,0.6);
    box-shadow: 0 1px 6px rgba(207,147,47,0.30);
}
