.bad-whelping-calculator {
  --g: #d2a84b;
  --gs: #f0d18a;
  --muted: #c8c2b7;
  margin: 2rem 0 2.75rem;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid rgba(210, 168, 75, 0.4);
  border-radius: 18px;
  background: linear-gradient(145deg, #181818, #101010);
  color: #f5f2ea;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.25);
}

.bad-whelping-calculator h2 {
  margin: 0 0 0.65rem;
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  line-height: 1.16;
}

.bad-whelping-kicker {
  margin: 0 0 0.4rem;
  color: var(--gs);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bad-whelping-intro {
  max-width: 46rem;
  margin-bottom: 1.5rem;
}

.bad-whelping-intro > p:last-child {
  margin: 0;
  color: var(--muted);
}

.bad-whelping-form,
.bad-whelping-dates,
.bad-whelping-field {
  display: grid;
}

.bad-whelping-form,
.bad-whelping-dates {
  gap: 1rem;
}

.bad-whelping-field {
  gap: 0.45rem;
}

.bad-whelping-field label {
  color: #f5f2ea;
  font-weight: 700;
}

.bad-whelping-field small {
  color: var(--muted);
  line-height: 1.45;
}

.bad-whelping-field select,
.bad-whelping-field input {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.85rem;
  border: 1px solid #5b574e;
  border-radius: 9px;
  background: #2a2927;
  color: #fff;
  color-scheme: dark;
  font: inherit;
}

.bad-whelping-field select:focus-visible,
.bad-whelping-field input:focus-visible,
.bad-whelping-actions button:focus-visible {
  outline: 3px solid var(--gs);
  outline-offset: 3px;
}

.bad-whelping-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.bad-whelping-actions button {
  min-height: 48px;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--g);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.bad-whelping-actions button[type="submit"] {
  background: var(--g);
  color: #15120b;
}

.bad-whelping-actions button[type="reset"] {
  background: transparent;
  color: #f5f2ea;
}

.bad-whelping-error {
  margin: 0.2rem 0 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid #e38a75;
  background: #321d18;
  color: #fff;
}

.bad-whelping-result {
  margin-top: 0.4rem;
  padding: 1.25rem;
  border: 1px solid rgba(210, 168, 75, 0.45);
  border-radius: 13px;
  background: #20201f;
}

.bad-whelping-result:focus {
  outline: 3px solid var(--gs);
  outline-offset: 3px;
}

.bad-whelping-result__eyebrow {
  margin: 0 0 0.9rem;
  color: var(--gs);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.bad-whelping-result__primary,
.bad-whelping-result__window {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem 0;
}

.bad-whelping-result__primary + .bad-whelping-result__window {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.bad-whelping-result span {
  color: var(--muted);
}

.bad-whelping-result strong {
  overflow-wrap: anywhere;
}

.bad-whelping-result__primary strong {
  color: #fff;
  font-size: clamp(1.25rem, 4vw, 1.85rem);
  line-height: 1.25;
}

.bad-whelping-result__window strong {
  color: var(--gs);
  font-size: 1.05rem;
}

.bad-whelping-result__note {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.bad-whelping-disclaimer {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-size: 0.92rem;
}

.bad-whelping-disclaimer strong {
  color: #fff;
}

.bad-whelping-calculator [hidden] {
  display: none !important;
}

@media (min-width: 720px) {
  .bad-whelping-dates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .bad-whelping-calculator {
    margin-inline: -4px;
    padding: 1.1rem;
    border-radius: 14px;
  }

  .bad-whelping-actions {
    display: grid;
  }

  .bad-whelping-actions button {
    width: 100%;
  }
}
