/*
 * ChildCareEd theme tokens and collapsible sections (storefront redesign T06, design decisions 23 and 24).
 *
 * Every colour a component uses is a token from :root below; no component stylesheet may write a hex colour
 * (utesting/tests/ThemeTemplatesScanTest.php checks cce-theme.css and cce-cards.css). The five site templates link this
 * file, so every page has the tokens and the section rules.
 */

:root {
  --cce-primary: #0876DC;
  --cce-primary-tint: #D1E9FB;
  --cce-ink: #0F1B3D;
  --cce-text: #283451;
  --cce-muted: #6D7680;
  --cce-line: #E3E8EF;
  --cce-line-strong: #C5CED9;
  --cce-star: #F5A623;
  --cce-cream: #FDF6E2;
  --cce-thumb-frame: #A0C885;
  --cce-surface: #FFFFFF;
  --cce-picture-bg: #F4F7FA;
  --cce-on-dark: #FFFFFF;
  --cce-caption-bg: rgba(15, 27, 61, 0.82);
  --cce-radius-card: 16px;
  --cce-radius-pill: 999px;
  --cce-shadow-card: 0 2px 10px rgba(15, 27, 61, 0.08);
}

/* ───────── Collapsible sections ─────────
 * Below 992px a section's panel may be closed by sectionStateFor() in sections.js; from 992px up the toggle of an
 * ordinary section is hidden and its panel always shows. A .cce-section--always keeps its toggle at every width. */

.cce-section {
  margin-bottom: 1rem;
}

.cce-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--cce-line);
  border-radius: var(--cce-radius-card);
  background: var(--cce-surface);
  color: var(--cce-ink);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
}

.cce-section-toggle::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  transition: transform 0.2s ease;
}

.cce-section-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.cce-section-panel {
  padding-top: 0.75rem;
}

@media (min-width: 992px) {
  .cce-section:not(.cce-section--always) > .cce-section-toggle {
    display: none;
  }
}

/* ───────── Topic and Age group icons (T07) ─────────
 * One size for every kind: a Font Awesome <i>, a Unicode <span> or a Flaticon <img>, all 20px square on a row. */

.cce-cat-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  color: var(--cce-primary);
  vertical-align: middle;
  object-fit: contain;
}

span.cce-cat-icon {
  font-size: 1rem;
}
