/* Seasonal CSSI / kick-sampling safety module
   Used by demos/ndrt/citizen-science.html
*/

.sampling-safety-panel {
  margin-top: 1.75rem;
  padding: 2rem;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(241, 248, 244, 0.96)),
    var(--surface-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.sampling-safety-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.sampling-safety-header h3 {
  margin: 0 0 0.6rem;
  color: var(--brand);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.08;
}

.sampling-safety-header p {
  margin: 0;
  color: var(--muted);
  max-width: 72ch;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15rem;
  padding: 0.78rem 1rem;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-align: center;
  border: 2px solid transparent;
}

.status-red {
  color: #8f211a;
  background: #fbe0dc;
  border-color: rgba(143, 33, 26, 0.22);
}

.status-amber {
  color: #7a4a00;
  background: #fff1cf;
  border-color: rgba(122, 74, 0, 0.22);
}

.status-green {
  color: #0f5e46;
  background: #dff4e6;
  border-color: rgba(15, 94, 70, 0.22);
}

.traffic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.traffic-card {
  padding: 1.2rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.traffic-card strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
}

.traffic-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.traffic-card-red {
  background: #fbe0dc;
  border-color: rgba(143, 33, 26, 0.18);
}

.traffic-card-amber {
  background: #fff1cf;
  border-color: rgba(122, 74, 0, 0.18);
}

.traffic-card-green {
  background: #dff4e6;
  border-color: rgba(15, 94, 70, 0.18);
}

.month-calendar {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.month-calendar li {
  min-height: 4.25rem;
  padding: 0.65rem 0.5rem;
  border-radius: 16px;
  text-align: center;
  font-weight: 900;
  line-height: 1.1;
  border: 2px solid transparent;
}

.month-calendar span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.month-red {
  background: #fbe0dc;
  color: #8f211a;
}

.month-amber {
  background: #fff1cf;
  color: #7a4a00;
}

.month-green {
  background: #dff4e6;
  color: #0f5e46;
}

.month-calendar .is-current {
  border-color: currentColor;
  box-shadow: 0 12px 24px rgba(16, 48, 38, 0.10);
  transform: translateY(-2px);
}

.no-kick-rule {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: 20px;
  background: #ffffff;
  border-left: 6px solid #8f211a;
}

.no-kick-rule strong:first-child {
  display: inline-grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  background: #fbe0dc;
  color: #8f211a;
  font-size: 1.6rem;
}

.no-kick-rule h4 {
  margin: 0 0 0.35rem;
  color: var(--brand);
}

.no-kick-rule p {
  margin: 0;
  color: var(--muted);
}

.safety-notes {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.safety-notes li + li {
  margin-top: 0.45rem;
}

.sampling-sources {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.sampling-sources a {
  color: var(--brand);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

@media (max-width: 980px) {
  .sampling-safety-header,
  .traffic-grid {
    grid-template-columns: 1fr;
  }

  .month-calendar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .status-pill {
    justify-self: start;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .sampling-safety-panel {
    padding: 1.4rem;
  }

  .month-calendar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .no-kick-rule {
    grid-template-columns: 1fr;
  }
}
