/**
 * The rules the token could not reach.
 *
 * Everything that reads var(--color-primary) already follows the new
 * colour, because ace-palette.php redeclares that token. What is left is
 * the handful of places where the accent was written out as an rgba()
 * literal, which cannot be built from a hex variable.
 *
 * Each block below is one such rule in the theme's stylesheet, restated
 * with the tint built from --ace-primary-rgb instead. The selectors are
 * the theme's own and were checked against it; if the theme renames one,
 * that tint quietly reverts to terracotta rather than breaking anything.
 */

/* The count badge in the top bar. */
.ace-topbar-badge {
  background: rgba(var(--ace-primary-rgb, 0,138,129), .15);
}

/* "Resume where you left off" on the dashboard. */
.ace-dash-resume {
  background: linear-gradient(135deg,
              rgba(var(--ace-primary-rgb, 0,138,129), .12),
              rgba(var(--ace-primary-rgb, 0,138,129), .04));
  border: 1px solid rgba(var(--ace-primary-rgb, 0,138,129), .3);
}

/* The round icon beside each activity entry. */
.ace-history-icon {
  background: rgba(var(--ace-primary-rgb, 0,138,129), .12);
}

/* A completed row in the course lists. */
.ace-player-content .ld-table-list-item-preview.learndash-complete {
  background: rgba(var(--ace-primary-rgb, 0,138,129), .14) !important;
}

/* The study-streak strip. */
.ace-dash-streak {
  background: rgba(var(--ace-primary-rgb, 0,138,129), .1);
  border: 1px solid rgba(var(--ace-primary-rgb, 0,138,129), .3);
}

/* The viewer's own row on the leaderboard. */
.ace-dash-leaderboard-row.is-you {
  background: rgba(var(--ace-primary-rgb, 0,138,129), .08);
}

/*
 * Filled accent buttons.
 *
 * The theme already sets white on .btn-primary, which is the right call
 * for teal: white reaches 4.24 against it where the near-black ground
 * only reaches 3.58. These are the other two places the accent is used as
 * a background, stated here so they agree.
 */
.btn-dark-outline:hover,
.ace-btn-primary {
  color: #fff;
}

/* =========================================================
   The course-tree status dots
   =========================================================

   The small circle beside each subject in the second sidebar. An
   unfinished one is drawn in the muted text colour, which is a warm
   taupe -- fine as body text, but as a 2px ring on a dark ground it
   reads as the old terracotta rather than as "not done yet".

   A cool grey says the same thing without arguing with the accent.
   Stated by property rather than by restating the whole border, so
   the theme keeps control of the ring's width and shape. */

.ace-status-dot {
  border-color: rgba(255, 255, 255, .26);
}

/* Done stays the accent. Restated here so that if the theme ever
   hardcodes this one, it still follows the palette. */
.ace-status-dot.is-complete {
  background: var(--color-primary, #008a81);
  border-color: var(--color-primary, #008a81);
}

/* The marker beside a section heading, and the rail it sits on: both
   belong to the accent, wherever the theme drew them from. */
.ace-sidebar-tree .ace-lesson-group.is-open > .ace-lesson-toggle .ace-status-dot,
.ace-sidebar-course-tree .ace-lesson-group.is-open > .ace-lesson-toggle .ace-status-dot {
  border-color: rgba(var(--ace-primary-rgb, 0, 138, 129), .55);
}

/* The calendar used to be patched from here, by matching the terracotta
   values it wrote inline. That is now fixed at source in the calendars
   plugin -- its event types are teal and its tints are built from
   --ace-primary-rgb -- so the patch has been removed rather than left to
   fight the plugin's own (now correct) rules. */
