/**
 * IBEU — remaps StoryMode student pages brought by the temp/ale port
 * (ranking, achievements, toasts). Loaded after themes/ibeu.css.
 *
 * When porting more StoryMode student CSS, add overrides here — do not leave
 * raw purple (#761bff / #ff006e) surfaces unscoped.
 */

/* -------------------------------------------------------------------------- */
/* Ranking (/my-profile/ranking)                                              */
/* -------------------------------------------------------------------------- */

body.brand-theme-ibeu .sm-ranking {
  color: var(--ibeu-ink);
}

body.brand-theme-ibeu .sm-ranking-season-card,
body.brand-theme-ibeu .sm-ranking-you {
  border: 1px solid #e6ebf2;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(39, 48, 68, 0.06);
}

body.brand-theme-ibeu .sm-ranking-season-card.is-paused {
  border-color: #e6ebf2;
  background: #f8fafc;
}

body.brand-theme-ibeu .sm-ranking-season-label {
  color: var(--ibeu-red);
}

body.brand-theme-ibeu .sm-ranking-season-dates,
body.brand-theme-ibeu .sm-ranking-you-tier,
body.brand-theme-ibeu .sm-ranking-section-head h2,
body.brand-theme-ibeu .sm-ranking-tier-head h3,
body.brand-theme-ibeu .sm-ranking-name {
  color: var(--ibeu-navy-deep);
}

body.brand-theme-ibeu .sm-ranking-season-hint,
body.brand-theme-ibeu .sm-ranking-you-label,
body.brand-theme-ibeu .sm-ranking-section-head p,
body.brand-theme-ibeu .sm-ranking-energy,
body.brand-theme-ibeu .sm-ranking-you-energy,
body.brand-theme-ibeu .sm-ranking-empty {
  color: #555555;
}

body.brand-theme-ibeu .sm-ranking-top-item {
  border: 1px solid #e6ebf2;
  background: #ffffff;
}

body.brand-theme-ibeu .sm-ranking-top-item.is-me,
body.brand-theme-ibeu .sm-ranking-player.is-me {
  border-color: rgba(230, 51, 35, 0.45);
  box-shadow: 0 0 0 1px rgba(230, 51, 35, 0.12);
}

body.brand-theme-ibeu .sm-ranking-place,
body.brand-theme-ibeu .sm-ranking-avatar-wrap {
  background: linear-gradient(145deg, #e63323, #114076);
}

body.brand-theme-ibeu .sm-ranking-avatar {
  background: #f5f7fa;
}

body.brand-theme-ibeu .sm-ranking-tier-block {
  border: 1px solid #e6ebf2;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(39, 48, 68, 0.06);
}

body.brand-theme-ibeu .sm-ranking-player {
  border: 1px solid #e6ebf2;
  background: #f8fafc;
  color: var(--ibeu-ink);
}

body.brand-theme-ibeu .sm-ranking-player:hover,
body.brand-theme-ibeu .sm-ranking-player:focus-visible {
  border-color: rgba(230, 51, 35, 0.55);
}

body.brand-theme-ibeu .sm-ranking-empty {
  border: 1px dashed #d0d7e2;
  background: #f8fafc;
}

/* -------------------------------------------------------------------------- */
/* Achievements (/my-achievements + profile cards)                            */
/* -------------------------------------------------------------------------- */

body.brand-theme-ibeu .achievements-summary {
  background: rgba(230, 51, 35, 0.1);
  border: 1px solid rgba(230, 51, 35, 0.35);
  color: var(--ibeu-navy-deep);
}

body.brand-theme-ibeu .achievements-summary.is-profile {
  border-color: rgba(17, 64, 118, 0.35);
  background: rgba(17, 64, 118, 0.08);
}

body.brand-theme-ibeu .achievements-summary i {
  color: var(--ibeu-red);
}

body.brand-theme-ibeu .achievement-card {
  background: #ffffff;
  border: 1px solid #e6ebf2;
  box-shadow: 0 8px 22px rgba(39, 48, 68, 0.06);
}

body.brand-theme-ibeu .achievement-card.is-earned {
  border-color: rgba(230, 51, 35, 0.4);
}

body.brand-theme-ibeu .achievement-card.is-on-profile {
  border-color: rgba(17, 64, 118, 0.45);
}

body.brand-theme-ibeu .achievement-card:hover {
  border-color: rgba(230, 51, 35, 0.55);
}

body.brand-theme-ibeu .achievement-top,
body.brand-theme-ibeu .achievement-desc,
body.brand-theme-ibeu .achievement-meta {
  color: #555555;
}

body.brand-theme-ibeu .achievement-card.is-earned .achievement-top {
  color: #166534;
}

body.brand-theme-ibeu .achievement-title,
body.brand-theme-ibeu .achievements-section-heading {
  color: var(--ibeu-navy-deep);
}

body.brand-theme-ibeu .achievement-unlocked-on {
  color: var(--ibeu-navy);
}

body.brand-theme-ibeu .achievement-progress {
  background: #e9edf3;
}

body.brand-theme-ibeu .achievement-progress > span {
  background: linear-gradient(90deg, #e63323, #114076);
}

body.brand-theme-ibeu .achievement-icon-fallback {
  color: var(--ibeu-red);
}

/* -------------------------------------------------------------------------- */
/* Achievement toast                                                          */
/* -------------------------------------------------------------------------- */

body.brand-theme-ibeu .sm-achievement-toast {
  background: #ffffff;
  border: 1px solid rgba(230, 51, 35, 0.35);
  box-shadow: 0 12px 32px rgba(39, 48, 68, 0.14);
  color: var(--ibeu-ink);
  font-family: var(--ibeu-font);
}

body.brand-theme-ibeu .sm-achievement-toast-thumb img {
  filter: drop-shadow(0 4px 12px rgba(230, 51, 35, 0.25));
}

body.brand-theme-ibeu .sm-achievement-toast-fallback {
  background: linear-gradient(135deg, #e63323, #114076);
}

body.brand-theme-ibeu .sm-achievement-toast-eyebrow {
  color: var(--ibeu-red);
}

body.brand-theme-ibeu .sm-achievement-toast-title,
body.brand-theme-ibeu .sm-achievement-toast-body {
  color: var(--ibeu-navy-deep);
}

/* -------------------------------------------------------------------------- */
/* Tutorial invite toast (extra accents)                                      */
/* -------------------------------------------------------------------------- */

body.brand-theme-ibeu #sm-tutorial-invite-toast .sm-tutorial-invite-badge,
body.brand-theme-ibeu #sm-tutorial-invite-toast [class*='invite'][style*='761bff'] {
  background: linear-gradient(145deg, #e63323, #114076) !important;
}

body.brand-theme-ibeu #sm-tutorial-invite-toast .sm-tutorial-invite {
  /* reinforce if page CSS loads after main theme */
  background: #ffffff !important;
  border-color: rgba(230, 51, 35, 0.35) !important;
  color: var(--ibeu-ink) !important;
  font-family: var(--ibeu-font) !important;
}
