/* ============================================================================
   Commission Church Chandler — Icon system (canonical, single-source).
   Each icon is ONE file in assets/icons/. The DOM never inlines icon markup;
   it applies the file as a CSS mask and paints it with `currentColor`. This:
     - keeps exactly one canonical source per icon (no duplication, no sync),
     - preserves colour control via `currentColor`, and
     - keeps every icon individually addressable (one file per name).

   Viewing: the mask files are separate relative-path requests, so this page
   must be SERVED (local static server, or the hosted review URL). Opening
   index.html straight from disk over file:// does not load them and the icons
   will not paint. That is a viewing-method constraint, not a source defect.
   Usage: <span class="cc-icon cc-icon--pin" aria-hidden="true"></span>
   ============================================================================ */

.cc-icon {
  display: inline-block;
  width: var(--cc-icon-md);
  height: var(--cc-icon-md);
  flex: none;
  background-color: currentColor;
  -webkit-mask-image: var(--cc-icon-url);
  mask-image: var(--cc-icon-url);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* One line per icon — the sole reference to each canonical source file. */
.cc-icon--menu       { --cc-icon-url: url(../assets/icons/menu.svg); }
.cc-icon--clock      { --cc-icon-url: url(../assets/icons/clock.svg); }
.cc-icon--calendar   { --cc-icon-url: url(../assets/icons/calendar.svg); }
.cc-icon--pin        { --cc-icon-url: url(../assets/icons/pin.svg); }
.cc-icon--watch      { --cc-icon-url: url(../assets/icons/watch.svg); }
.cc-icon--navigation { --cc-icon-url: url(../assets/icons/navigation.svg); }
.cc-icon--group      { --cc-icon-url: url(../assets/icons/group.svg); }
/* EVENTS-04's Youth row. Family exception: drawn at 1.8 units against the
   family's 2, because three figures read heavy at the family weight. */
.cc-icon--youth      { --cc-icon-url: url(../assets/icons/youth.svg); }
.cc-icon--home       { --cc-icon-url: url(../assets/icons/home.svg); }
.cc-icon--compass    { --cc-icon-url: url(../assets/icons/compass.svg); }
.cc-icon--person     { --cc-icon-url: url(../assets/icons/person.svg); }
.cc-icon--envelope   { --cc-icon-url: url(../assets/icons/envelope.svg); }
/* EVENTS-04's Spanish Service row, and the same row in the Home service list
   and in both footers, which have been carrying no icon at all. A globe inside
   a speech bubble: the row is about the language a service is held in, not
   about a place. Family exception, and the only one of its kind: the globe's
   own lines are drawn at 1.35 units against the family's 2. A globe is
   inherently the densest shape in this collection - a bare one measures 46%
   ink against clock's 26% - and at the 25px the info-list sets, a globe at the
   full family weight closes into a solid disc. The accepted comps draw the
   same contrast: a heavy bubble ring around a lighter globe. */
.cc-icon--language   { --cc-icon-url: url(../assets/icons/language.svg); }
.cc-icon--giving-heart { --cc-icon-url: url(../assets/icons/giving-heart.svg); }
/* GIVE-02's "You can" rows. A checkmark inside a circle, drawn at
   the family weight so the ring and the tick read as one mark when the mask is
   painted a single colour. The info-list icon slot paints it --cc-red. */
.cc-icon--check-circle { --cc-icon-url: url(../assets/icons/check-circle.svg); }
/* VISIT-06 labels with no existing icon. clock-dial is a second clock, not a
   replacement for the first: the Before You Come list carries Service time and
   Service length as adjacent rows, so the two need to read apart. It is the
   clock face with a twelve-mark dial added and the same circle geometry, so it
   sits in the family rather than beside it. car is the Parking row. */
.cc-icon--clock-dial { --cc-icon-url: url(../assets/icons/clock-dial.svg); }
.cc-icon--car        { --cc-icon-url: url(../assets/icons/car.svg); }
/* Points down when the disclosure is closed; the object rotates it 180 degrees
   when open, so one file serves both states. */
.cc-icon--chevron    { --cc-icon-url: url(../assets/icons/chevron.svg); }

/* Third-party mark, used with permission. Family exception: it keeps its own
   1000x1000 viewBox and is a filled mark rather than a 2px stroke, because a
   trademark is reproduced as supplied and not redrawn to match the family.
   Wordmark omitted by founder direction; the supplied file carries both. */
.cc-icon--celebrate-recovery { --cc-icon-url: url(../assets/icons/celebrate-recovery.svg); }
/* The Watch section (VISIT-05, HOME-07). youtube is the channel's own mark,
   so it is a family exception: a filled shape, not the family's 2-unit
   stroke. The play triangle is cut out of the box, so on the primary button
   the box paints white and the button's red shows through the triangle.
   external-link is drawn at the family weight and marks a link that leaves
   the site; the feature-split note sets it in front of its words. */
.cc-icon--youtube    { --cc-icon-url: url(../assets/icons/youtube.svg); }
.cc-icon--external-link { --cc-icon-url: url(../assets/icons/external-link.svg); }

/* Church names and static addresses use the supplied filled church mark.
   The info-list selector also covers existing website address markup. */
.cc-icon--church,
.cc-info-list__icon > .cc-icon--pin {
  --cc-icon-url: url(../assets/icons/church.svg);
}
