/*
 * CCG Calvary gift drive: "pick a child" view
 *
 * Every selector starts with .ccgc, so nothing here styles the host page.
 * To keep The7, Elementor and Bootstrap rules out, there is a reset for the
 * elements used inside, and component selectors are written as element.class
 * and restate margin, border, list and button basics.
 * Tokens live on .ccgc. DESIGN.md says what each one is for.
 */

.ccgc {
  --ccgc-ink: #13153f; /* body text */
  --ccgc-navy: #1d2c5b; /* headings, pressed filters, focus ring */
  --ccgc-green: #3c8d0d; /* large type and bullets only (4.2:1 on white) */
  --ccgc-go: #2f7a0b; /* primary buttons (5.4:1 with white text) */
  --ccgc-tint: #eef4fb; /* cards and message blocks */
  --ccgc-muted: #555c7c; /* hints, placeholders, input borders */
  --ccgc-error: #b3261e;
  --ccgc-error-tint: #fdeeec;
  --ccgc-page: #fff; /* the band this sits on (shows through the tag hole) */
  --ccgc-r: 6px;
  --ccgc-font: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Motion. ccgc-view.js reads the first six by name, so keep the times in ms. */
  --ccgc-t1: 150ms; /* presses, leaving */
  --ccgc-t2: 220ms; /* arriving, opening, closing */
  --ccgc-t3: 320ms; /* gliding, the phone sheet */
  --ccgc-ease-out: cubic-bezier(0.2, 0, 0, 1); /* arriving */
  --ccgc-ease-in: cubic-bezier(0.4, 0, 1, 1); /* leaving */
  --ccgc-ease: cubic-bezier(0.4, 0, 0.2, 1); /* moving in place */
  --ccgc-rise: 12px; /* an entrance's travel */

  display: block;
  width: 100%; /* stay full width even as a flex item in an Elementor container */
  max-width: 100%;
  font-family: var(--ccgc-font);
  font-size: 17.6px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ccgc-ink);
  text-align: left;
  -webkit-text-size-adjust: 100%;
}

/* ----- Reset inside the scope ----- */

.ccgc,
.ccgc *,
.ccgc *::before,
.ccgc *::after {
  box-sizing: border-box;
}

.ccgc :is(h2, h3, p, ul, li, dl, dt, dd, form, label, button, input, a, strong, span, div, dialog) {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  letter-spacing: normal;
  text-transform: none;
  text-indent: 0;
  text-shadow: none;
  box-shadow: none;
  float: none;
  min-width: 0;
  max-width: none;
}

.ccgc :is(ul, li) {
  list-style: none;
}

.ccgc :is(li, dt, dd)::before,
.ccgc :is(li, dt, dd)::after {
  content: none;
}

.ccgc strong {
  font-weight: 700;
}

.ccgc [hidden] {
  display: none !important;
}

.ccgc .ccgc-vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ccgc :is(button, a, input, [tabindex]):focus {
  outline: none;
}

.ccgc :is(button, a, input, [tabindex]):focus-visible {
  outline: 3px solid var(--ccgc-navy);
  outline-offset: 2px;
}

.ccgc svg.ccgc-ico {
  flex: none;
  display: block;
  width: 18px;
  height: 18px;
  transition: transform var(--ccgc-t2) var(--ccgc-ease); /* the chevron turns */
}

/* ----- Section header ----- */

.ccgc .ccgc-body {
  container: ccgc / inline-size;
}

.ccgc h2.ccgc-title {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ccgc-navy);
  text-align: left;
}

.ccgc p.ccgc-lede {
  margin: 12px 0 0;
  max-width: 44em;
}

.ccgc p.ccgc-facts {
  margin: 10px 0 0;
  max-width: 44em;
}

.ccgc a.ccgc-a {
  color: var(--ccgc-navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

/* ----- Buttons ----- */

.ccgc button:is(.ccgc-btn, .ccgc-link, .ccgc-toggle, .ccgc-x) {
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: var(--ccgc-r);
  box-shadow: none;
  font-family: var(--ccgc-font);
  letter-spacing: normal;
  text-transform: none;
  text-shadow: none;
  transition: transform var(--ccgc-t1) var(--ccgc-ease-out); /* lift and press; colors switch at once */
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.ccgc button.ccgc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 22px;
  background: var(--ccgc-go);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.ccgc button.ccgc-btn:active {
  background: var(--ccgc-ink);
  color: #fff;
}

.ccgc button.ccgc-btn[aria-disabled="true"] {
  background: var(--ccgc-navy);
  color: #fff;
  cursor: progress;
}

.ccgc button.ccgc-btn--block {
  display: flex;
  width: 100%;
}

.ccgc button.ccgc-btn--quiet {
  background: var(--ccgc-tint);
  color: var(--ccgc-navy);
}

/* Text-style button: expand, clear, remove */
.ccgc button.ccgc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0;
  border-radius: 2px;
  background: none;
  color: var(--ccgc-navy);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ----- Filters ----- */

.ccgc .ccgc-filters {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.ccgc .ccgc-seg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ccgc .ccgc-seg__label {
  flex: none;
  margin-right: 4px;
  font-size: 16px;
  font-weight: 700;
}

.ccgc button.ccgc-toggle {
  flex: 1 1 0;
  min-width: min-content;
  min-height: 44px;
  padding: 8px 4px;
  background: var(--ccgc-tint);
  color: var(--ccgc-navy);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.ccgc button.ccgc-toggle[aria-pressed="true"] {
  background: var(--ccgc-navy);
  color: #fff;
  font-weight: 700;
}

.ccgc .ccgc-search {
  position: relative;
}

.ccgc .ccgc-search svg.ccgc-ico {
  position: absolute;
  left: 14px;
  top: 15px;
  color: var(--ccgc-muted);
  pointer-events: none;
}

/* ----- Inputs ----- */

.ccgc input.ccgc-input {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0 14px;
  border: 1.5px solid var(--ccgc-muted);
  border-radius: var(--ccgc-r);
  box-shadow: none;
  background: #fff;
  color: var(--ccgc-ink);
  font-family: var(--ccgc-font);
  font-size: 16px; /* 16px or more stops iOS zooming on focus */
  font-weight: 400;
  line-height: normal;
  letter-spacing: normal;
  text-transform: none;
  transition: none;
  -webkit-appearance: none;
  appearance: none;
}

.ccgc input.ccgc-input::placeholder {
  color: var(--ccgc-muted);
  opacity: 1;
}

.ccgc input.ccgc-input:focus-visible {
  border-color: var(--ccgc-navy);
  outline-offset: 1px;
}

.ccgc input.ccgc-input[aria-invalid="true"] {
  border: 2px solid var(--ccgc-error);
}

.ccgc input.ccgc-input--search {
  padding-left: 42px;
}

/* ----- Count row ----- */

.ccgc .ccgc-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 20px;
  margin: 26px 0 12px;
}

.ccgc p.ccgc-count {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ccgc-green);
}

.ccgc .ccgc-count__n {
  display: inline-block;
}

/* ----- Session note after a signup ----- */

.ccgc .ccgc-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 20px;
  margin-top: 22px;
  padding: 12px 18px;
  border-radius: var(--ccgc-r);
  background: var(--ccgc-tint);
}

/* ----- Child list ----- */

.ccgc ul.ccgc-list {
  position: relative; /* a card on its way out is placed against the list */
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/*
 * One child, one gift tag: flat tint, one clipped corner, one punched hole.
 * The hole is the page color, so keep --ccgc-page in sync with the band behind.
 * To drop the motif, delete the clip-path line and the ::after rule.
 */
.ccgc li.ccgc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: 20px;
  border-radius: var(--ccgc-r);
  background: var(--ccgc-tint);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
  list-style: none;
}

.ccgc li.ccgc-card::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ccgc-page);
}

.ccgc h3.ccgc-card__name {
  margin: 0;
  padding-right: 44px; /* clears the tag hole */
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ccgc-navy);
  text-align: left;
  overflow-wrap: anywhere;
}

.ccgc p.ccgc-card__meta {
  margin: 2px 0 0;
  font-size: 16px;
  line-height: 1.4;
}

.ccgc p.ccgc-card__likes {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.ccgc .ccgc-card__body {
  align-self: stretch;
}

.ccgc ul.ccgc-wishes {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  line-height: 1.45;
}

.ccgc ul.ccgc-wishes > li {
  position: relative;
  margin: 0;
  padding: 2px 0 2px 16px;
  list-style: none;
  overflow-wrap: anywhere;
}

.ccgc ul.ccgc-wishes > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(0.725em - 1px);
  width: 6px;
  height: 6px;
  background: var(--ccgc-green);
}

/* Collapsed: three one-line wishes; the rest and the sizes wait behind the toggle */
.ccgc li.ccgc-card:not(.is-open) ul.ccgc-wishes > li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ccgc li.ccgc-card:not(.is-open) .ccgc-more {
  display: none;
}

.ccgc li.ccgc-card:not(.is-open) p.ccgc-card__likes {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.ccgc dl.ccgc-sizes {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 14px;
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.45;
}

.ccgc dl.ccgc-sizes dt {
  margin: 0;
  font-weight: 700;
}

.ccgc dl.ccgc-sizes dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.ccgc button.ccgc-card__toggle {
  margin-top: 2px;
}

.ccgc li.ccgc-card.is-open svg.ccgc-ico--chev {
  transform: rotate(180deg);
}

.ccgc li.ccgc-card button.ccgc-btn {
  max-width: 100%;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.ccgc li.ccgc-card--plain button.ccgc-btn {
  margin-top: 16px;
}

/* ----- Loading skeleton ----- */

.ccgc ul.ccgc-list--skel {
  margin-top: 26px;
}

.ccgc li.ccgc-card.ccgc-card--skel {
  min-height: 228px;
  animation: none; /* only real cards enter */
}

.ccgc .ccgc-bar {
  display: block;
  width: 100%;
  height: 14px;
  margin-top: 14px;
  border-radius: 3px;
  background: var(--ccgc-page);
  animation: ccgc-pulse 1.4s ease-in-out infinite;
}

.ccgc .ccgc-bar--name {
  width: 52%;
  height: 22px;
  margin-top: 2px;
}

.ccgc .ccgc-bar--short {
  width: 34%;
}

.ccgc .ccgc-bar--mid {
  width: 78%;
}

.ccgc .ccgc-bar--btn {
  width: 180px;
  max-width: 70%;
  height: 48px;
  margin-top: 26px;
  border-radius: var(--ccgc-r);
}

@keyframes ccgc-pulse {
  50% {
    opacity: 0.45;
  }
}

/* ----- State messages ----- */

.ccgc .ccgc-msg {
  margin-top: 24px;
  padding: 28px 24px 30px;
  border-radius: var(--ccgc-r);
  background: var(--ccgc-tint);
}

.ccgc .ccgc-empty {
  padding: 0 0 8px;
}

.ccgc h3.ccgc-msg__title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ccgc-navy);
  text-align: left;
}

.ccgc p.ccgc-msg__text {
  margin: 10px 0 0;
  max-width: 40em;
}

.ccgc .ccgc-empty p.ccgc-msg__text {
  margin-top: 0;
}

.ccgc .ccgc-msg button.ccgc-btn,
.ccgc .ccgc-empty button.ccgc-btn {
  margin-top: 18px;
}

/* ----- Dialog ----- */

.ccgc dialog.ccgc-dialog {
  position: fixed;
  inset: 0;
  width: min(560px, calc(100vw - 32px));
  max-width: none;
  height: fit-content;
  max-height: min(92vh, 900px);
  max-height: min(92dvh, 900px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--ccgc-ink);
  overflow: auto;
  overscroll-behavior: contain;
}

.ccgc dialog.ccgc-dialog:not([open]) {
  display: none;
}

.ccgc dialog.ccgc-dialog[open] {
  display: block;
  animation: ccgc-rise var(--ccgc-t2) var(--ccgc-ease-out);
}

/* Older browsers pass no custom properties to ::backdrop, hence the fallbacks. */
.ccgc dialog.ccgc-dialog::backdrop {
  background: rgba(19, 21, 63, 0.62);
  animation: ccgc-fade var(--ccgc-t2, 220ms) var(--ccgc-ease-out, ease-out);
}

/* The script adds .is-closing, waits for this to end, then closes and returns focus. */
.ccgc dialog.ccgc-dialog.is-closing {
  animation: ccgc-sink var(--ccgc-t1) var(--ccgc-ease-in) forwards;
}

.ccgc dialog.ccgc-dialog.is-closing::backdrop {
  animation: ccgc-out var(--ccgc-t1, 150ms) var(--ccgc-ease-in, ease-in) forwards;
}

/* Browsers without showModal(): same box, backdrop painted by a spread shadow */
.ccgc dialog.ccgc-dialog--plain[open] {
  z-index: 2147483000;
  box-shadow: 0 0 0 100vmax rgba(19, 21, 63, 0.62);
}

.ccgc .ccgc-dialog__in {
  padding: 26px 28px 30px;
}

.ccgc .ccgc-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ccgc h2.ccgc-dialog__title {
  margin: 0;
  padding-top: 5px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ccgc-navy);
  text-align: left;
  overflow-wrap: anywhere;
}

/* Focused by script so the title is announced. It is not a control. */
.ccgc h2.ccgc-dialog__title:focus-visible {
  outline: none;
}

.ccgc button.ccgc-x {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 -10px 0 0;
  padding: 0;
  background: none;
  color: var(--ccgc-navy);
}

.ccgc button.ccgc-x svg.ccgc-ico {
  width: 22px;
  height: 22px;
}

.ccgc p.ccgc-dialog__sub {
  margin: 4px 0 0;
}

.ccgc p.ccgc-dialog__lead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ccgc-green);
}

/* Success mark: on a new signup the tag draws itself in, then its check. */
.ccgc svg.ccgc-ico--won {
  width: 34px;
  height: 34px;
}

.ccgc p.ccgc-dialog__lead.is-new path {
  stroke-dasharray: 1; /* one full dash: each path's length is set to 1 */
  animation: ccgc-draw var(--ccgc-t3) var(--ccgc-ease) backwards;
}

.ccgc p.ccgc-dialog__lead.is-new path + path {
  animation-delay: var(--ccgc-t2);
}

.ccgc h3.ccgc-dialog__h {
  margin: 24px 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ccgc-navy);
  text-align: left;
}

.ccgc p.ccgc-p {
  margin: 12px 0 0;
}

.ccgc .ccgc-dialog__in ul.ccgc-wishes,
.ccgc .ccgc-dialog__in dl.ccgc-sizes {
  font-size: 17px;
}

.ccgc .ccgc-dialog__in button.ccgc-btn--block {
  margin-top: 26px;
}

/* ----- Form ----- */

.ccgc .ccgc-alert {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--ccgc-r);
  background: var(--ccgc-error-tint);
  color: var(--ccgc-ink);
  font-weight: 600;
  line-height: 1.5;
}

.ccgc .ccgc-field {
  margin-top: 14px;
}

.ccgc label.ccgc-label {
  display: block;
  width: auto;
  margin: 0 0 6px;
  padding: 0;
  color: var(--ccgc-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.ccgc .ccgc-opt {
  font-weight: 400;
  color: var(--ccgc-muted);
}

.ccgc p.ccgc-err {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ccgc-error);
}

/* A row opens by height from nothing, so the gap above it sits inside its box. */
.ccgc .ccgc-partner {
  display: flow-root;
}

.ccgc .ccgc-partner__head {
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ccgc p.ccgc-partner__name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ccgc-navy);
}

.ccgc .ccgc-partner__head + .ccgc-field {
  margin-top: 4px;
}

.ccgc .ccgc-addrow {
  margin-top: 22px;
}

.ccgc p.ccgc-hint {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ccgc-muted);
}

.ccgc p.ccgc-foot {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ccgc-muted);
  text-align: center;
}

.ccgc svg.ccgc-ico--spin {
  animation: ccgc-spin 0.8s linear infinite;
}

@keyframes ccgc-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ----- Motion ----- */
/* Entrances play once, when an element is created or un-hidden. ccgc-view.js runs the rest. */

.ccgc li.ccgc-card,
.ccgc .ccgc-filters,
.ccgc .ccgc-status,
.ccgc .ccgc-msg,
.ccgc .ccgc-empty,
.ccgc .ccgc-alert,
.ccgc p.ccgc-err,
.ccgc .ccgc-dialog__in--swap {
  animation: ccgc-rise var(--ccgc-t2) var(--ccgc-ease-out) backwards;
}

/* Set by the script while a block opens or closes by height */
.ccgc .is-sizing {
  overflow: hidden;
  overflow: visible clip;
}

@keyframes ccgc-rise { from { opacity: 0; transform: translateY(var(--ccgc-rise)); } }
@keyframes ccgc-sink { to { opacity: 0; transform: translateY(var(--ccgc-rise)); } }
@keyframes ccgc-fade { from { opacity: 0; } }
@keyframes ccgc-out { to { opacity: 0; } }
@keyframes ccgc-draw { from { stroke-dashoffset: 1; opacity: 0; } 1% { opacity: 1; } }

/* ----- Hover, only where there is a real pointer ----- */
/* On touch screens :hover sticks after a tap, and a filter would look pressed. */

@media (hover: hover) {
  .ccgc button.ccgc-btn:not([aria-disabled="true"]):hover {
    background: var(--ccgc-navy);
    color: #fff;
    transform: translateY(-2px);
  }

  .ccgc button.ccgc-toggle:hover {
    box-shadow: inset 0 0 0 2px var(--ccgc-navy);
  }

  .ccgc button.ccgc-link:hover,
  .ccgc a.ccgc-a:hover {
    color: var(--ccgc-go);
  }

  .ccgc button.ccgc-x:hover {
    background: var(--ccgc-tint);
  }
}

/* Press comes after hover, so it wins while the pointer is down. */
.ccgc button:is(.ccgc-btn, .ccgc-toggle, .ccgc-x):not([aria-disabled="true"]):active {
  transform: translateY(1px);
}

/* ----- Phone: the dialog becomes a full-height sheet ----- */

@media (max-width: 600px) {
  .ccgc dialog.ccgc-dialog {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
    --ccgc-rise: 100%; /* the sheet slides up from the bottom edge */
  }

  .ccgc dialog.ccgc-dialog[open] {
    animation-duration: var(--ccgc-t3);
  }

  .ccgc dialog.ccgc-dialog.is-closing {
    animation-duration: var(--ccgc-t2);
  }

  .ccgc .ccgc-dialog__in {
    padding: 14px 20px 32px;
    --ccgc-rise: 12px; /* back to normal inside the sheet */
  }

  .ccgc h2.ccgc-dialog__title {
    font-size: 26px;
  }
}

/* ----- Wider containers (the section's own width, not the viewport) ----- */

@container ccgc (min-width: 560px) {
  .ccgc h2.ccgc-title {
    font-size: 36px;
  }

  .ccgc button.ccgc-toggle {
    flex: 0 0 auto;
    padding: 8px 18px;
    font-size: 16px;
  }

  .ccgc .ccgc-search {
    max-width: 340px;
  }
}

@container ccgc (min-width: 640px) {
  .ccgc ul.ccgc-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .ccgc .ccgc-msg {
    padding: 36px 36px 38px;
  }
}

@container ccgc (min-width: 960px) {
  .ccgc h2.ccgc-title {
    font-size: 40px;
  }

  .ccgc .ccgc-filters {
    grid-template-columns: auto auto minmax(200px, 1fr);
    align-items: center;
    gap: 12px 28px;
  }

  .ccgc .ccgc-search {
    max-width: none;
  }

  .ccgc ul.ccgc-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

/* ----- Motion and contrast preferences ----- */

/* Reduced motion: stop non-essential CSS motion. ccgc-view.js checks too. */
@media (prefers-reduced-motion: reduce) {
  .ccgc,
  .ccgc dialog.ccgc-dialog,
  .ccgc .ccgc-dialog__in {
    --ccgc-rise: 0px;
  }

  .ccgc *,
  .ccgc *::before,
  .ccgc *::after,
  .ccgc dialog.ccgc-dialog::backdrop {
    animation: none !important;
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .ccgc li.ccgc-card,
  .ccgc .ccgc-msg,
  .ccgc .ccgc-note,
  .ccgc .ccgc-alert,
  .ccgc button.ccgc-btn,
  .ccgc button.ccgc-toggle {
    border: 1px solid CanvasText;
  }

  .ccgc li.ccgc-card {
    clip-path: none;
  }

  .ccgc li.ccgc-card::after {
    display: none;
  }

  .ccgc button.ccgc-toggle[aria-pressed="true"] {
    background: Highlight;
    color: HighlightText;
    forced-color-adjust: none;
  }
}
