/**
 * SignUpGenius: the signup cards. Forked from the store grid so a signup card
 * and a store card read as the same family; theme-token fallbacks keep the
 * module presentable on any theme.
 */

.rt-sg-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 24px;
  max-width: var(--rt-maxw, 1120px);
  margin: 0 auto;
  justify-content: center;
}
/* Explicit column counts, the store grid's pattern. The old
   auto-fit minmax(300px, 360px) counted columns by the 360px MAX
   (that is what the spec says auto-fit does), and three 360s plus
   gaps overflow an 1100px container by 28px, so a full season of
   signups rendered as two skinny centered columns. */
@media (min-width: 760px) {
  .rt-sg-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* One or two signups: tracks size to a card and the set centers,
     instead of parking left in a multi-lane grid. */
  .rt-sg-grid.rt-sg-grid--few {
    grid-template-columns: repeat( auto-fit, minmax(300px, 360px) );
  }
}
@media (min-width: 1100px) {
  .rt-sg-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1400px) {
  .rt-sg-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Month sections wear the staff-birthdays clothes: each month is a white
   card whose title is a filled banner strip, not a bare underlined
   heading. Rules mirror .rt-ft-bd-month / .rt-ft-bd-month-title in
   favorite-things.css, including the standalone gradient. */
.rt-sg-month {
  background: var(--rt-white, #fff);
  border: 1px solid var(--rt-line, #e7e2d6);
  border-radius: var(--rt-radius, 10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  max-width: var(--rt-maxw, 1120px);
  margin: 0 auto 40px;
  overflow: hidden;
}
.rt-sg-month .rt-sg-month-title {
  margin: 0;
  background: var(--rt-black, #141414);
  /* Bright primary reads on the dark strip in BOTH palettes (Henry's gold,
     Cox's light blue); the plain primary is too dim on Cox navy. */
  color: var(--rt-primary-bright, var(--rt-primary, #f4b41c));
  font-family: var(--rt-font-display, "RT Display", "Arial Narrow", sans-serif);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 22px;
  border-bottom: 3px solid var(--rt-primary, #f4b41c);
}
.rt-sg-standalone .rt-sg-month .rt-sg-month-title {
  background: linear-gradient(135deg, var(--rt-primary, #f4b41c), var(--rt-secondary, #d99a00));
  color: var(--rt-on-primary, #ffffff);
  border-bottom-color: var(--rt-primary-bright, #ffc845);
}
.rt-sg-month .rt-sg-month-title i {
  margin-right: 10px;
  font-size: 0.9em;
}
/* Cards breathe inside the month card instead of touching its walls. */
.rt-sg-month .rt-sg-grid {
  padding: 24px 22px;
}

/* The search hides cards and emptied months with the hidden attribute; the
   card's own display rule would out-cascade the browser default, so both
   get an explicit rule. */
.rt-sg-card[hidden],
.rt-sg-month[hidden] {
  display: none;
}

.rt-sg-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 1px solid var(--rt-line, #e7e2d6);
  border-radius: var(--rt-radius, 10px);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--rt-shadow, 0 6px 24px rgba(0, 0, 0, 0.12));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rt-sg-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--rt-shadow-lift, 0 10px 24px rgba(0, 0, 0, 0.12));
}

/* The slim branded strip the no-artwork store cards use: signups carry no
   artwork of their own. */
.rt-sg-art {
  flex: none;
  height: 72px;
  background-image: var(--rt-banner-logo, none);
  background-size: auto 54px;
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-color: var(--rt-black, #141414);
  box-shadow: inset 0 -3px 0 var(--rt-primary, #f4b41c);
}

.rt-sg-body {
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.rt-sg-name {
  margin: 0 0 6px;
  font-family: var(--rt-font-display, "RT Display", "Arial Narrow", sans-serif);
  font-weight: var(--rt-font-display-weight, 400);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.25rem;
}
.rt-sg-name a {
  color: inherit;
  text-decoration: none;
}
.rt-sg-name a:hover {
  text-decoration: underline;
}

.rt-sg-meta {
  margin: 0 0 6px;
  color: var(--rt-gray, #6b6b6b);
  font-size: 0.92rem;
}

/* ---- Fill meter ------------------------------------------------------------ */

.rt-sg-meter {
  height: 10px;
  margin: 8px 0 6px;
  border-radius: 999px;
  background: var(--rt-line, #e7e2d6);
  overflow: hidden;
}
.rt-sg-meter-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--rt-primary, #f4b41c);
  transition: width 0.3s ease;
}
.rt-sg-meter-fill--full {
  background: var(--rt-secondary, #d99a00);
}

.rt-sg-meter-text {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--rt-ink, #1f1f1f);
}
.rt-sg-meter-text strong {
  color: var(--rt-secondary, #d99a00);
}

/* ---- Open needs list ------------------------------------------------------- */

.rt-sg-needs {
  margin: 0 0 8px;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--rt-ink, #1f1f1f);
}
.rt-sg-needs li {
  margin: 0 0 3px;
}
.rt-sg-needs-more {
  list-style: none;
  margin-left: -18px;
  color: var(--rt-gray, #6b6b6b);
}

/* ---- Button + chip (the store's visual language) --------------------------- */

.rt-sg-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  /* Phones: the pair sits centered. */
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  margin-bottom: 0;
}
/* Desktop: Sign Up anchors right, Add to Calendar left, one line when it
   fits. row-reverse keeps Sign Up first in the DOM (and for keyboards and
   screen readers) while space-between spreads the pair; a lone Sign Up
   still lands on the right, so every card's primary button lines up. */
@media (min-width: 760px) {
  .rt-sg-ctas {
    flex-direction: row-reverse;
    justify-content: space-between;
  }
}

/* The calendar button plays second chair: Sign Up keeps the fill, this one
   is a quiet outline. The base .rt-sg-btn color is !important (host-theme
   link colors out-specify it), so the recolor must be too. */
.rt-sg-btn--cal {
  background: transparent;
  border: 1px solid var(--rt-line, #e7e2d6);
  color: var(--rt-ink, #1f1f1f) !important;
  font-weight: 600;
}
.rt-sg-btn--cal:hover {
  background: var(--rt-primary, #f4b41c);
  border-color: var(--rt-primary, #f4b41c);
  color: var(--rt-on-primary, #141414) !important;
}

.rt-sg-btn {
  display: inline-block;
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--rt-primary, #f4b41c);
  color: var(--rt-on-primary, #141414) !important;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: inherit;
  text-decoration: none;
  cursor: pointer;
}
.rt-sg-btn:hover {
  background: var(--rt-secondary, #d99a00);
}

.rt-sg-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--rt-line, #e7e2d6);
  color: var(--rt-gray, #6b6b6b);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Standalone scope (foreign theme): match the site's heading face, as the
   other modules' standalone scopes do. */
.rt-sg-standalone .rt-sg-name {
  font-family: Oswald, Helvetica, Arial, sans-serif;
}
