/* ============================================================
   BumpDays — stylesheet
   Palette: warm ivory / deep rose / sage / plum / peach
   Type: Fraunces (display) + Karla (body)
   ============================================================ */

:root {
  --ivory: #FBF6F0;
  --blush: #F5E6E0;
  --rose: #B85C78;
  --rose-deep: #7E3A52;
  --sage: #7C9473;
  --sage-light: #E4EBE0;
  --plum: #362A33;
  --peach: #EFB39C;
  --gold: #C89A4B;
  --white: #FFFFFF;
  --line: #E8DCD3;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Karla', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--plum);
  line-height: 1.55;
  padding-bottom: 84px; /* space for bottom tab bar */
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--rose-deep);
  line-height: 1.15;
  margin: 0 0 .5rem;
}

p { margin: 0 0 1rem; }
.muted { color: #8a7b83; font-size: .9rem; }

a { color: var(--rose-deep); }

button {
  font-family: var(--font-body);
  cursor: pointer;
}

.hidden { display: none !important; }

/* ---------- Top bar / disclaimer ribbon ---------- */

.disclaimer-ribbon {
  background: var(--rose-deep);
  color: var(--white);
  font-size: .78rem;
  text-align: center;
  padding: .55rem 1rem;
  line-height: 1.4;
}
.disclaimer-ribbon a { color: var(--peach); text-decoration: underline; }

.top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 1rem .6rem;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--rose-deep);
  letter-spacing: .01em;
}
.brand span { color: var(--sage); }

/* ---------- Layout ---------- */

main { max-width: 640px; margin: 0 auto; padding: 0 1.1rem; }

.panel { display: none; padding-top: .5rem; }
.panel.active { display: block; }

section { margin-bottom: 2.2rem; }

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  border: 1px solid var(--line);
}

/* ---------- Home / hero ---------- */

.due-date-setup {
  background: var(--blush);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.4rem;
  text-align: center;
}
.due-date-setup h1 { font-size: 1.7rem; margin-bottom: .3rem; }
.due-date-setup p { color: #6f5a63; }

#due-date-form {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  margin-top: 1.2rem;
}
#due-date-form label {
  font-size: .85rem;
  text-align: left;
  color: var(--rose-deep);
  font-weight: 700;
}
input[type="date"], input[type="text"], select, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: .75rem .9rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--plum);
  width: 100%;
}
input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 1px;
}

.btn-primary {
  background: var(--rose-deep);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: .85rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  transition: background .15s ease;
}
.btn-primary:hover { background: var(--rose); }

.btn-secondary {
  background: transparent;
  color: var(--rose-deep);
  border: 1.5px solid var(--rose-deep);
  border-radius: 999px;
  padding: .7rem 1.3rem;
  font-size: .9rem;
  font-weight: 700;
}

.week-hero {
  background: linear-gradient(160deg, var(--rose-deep), var(--rose));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.week-hero .eyebrow {
  font-size: .85rem;
  color: var(--peach);
  font-weight: 700;
  margin-bottom: .2rem;
}
.week-hero .big-week {
  font-family: var(--font-display);
  font-size: 4.2rem;
  font-weight: 600;
  line-height: 1;
  margin: .2rem 0 .1rem;
}
.week-hero .big-week span { font-size: 1.6rem; font-weight: 400; opacity: .85; }
.week-hero .days-to-go { font-size: .95rem; opacity: .92; margin-bottom: 1rem; }

.progress-track {
  height: 8px;
  background: rgba(255,255,255,.28);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--peach);
  border-radius: 99px;
  transition: width .4s ease;
}

.hero-actions { margin-top: 1.1rem; }
.hero-actions button {
  background: rgba(255,255,255,.16);
  color: var(--white);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  padding: .5rem 1rem;
  font-size: .82rem;
}

.size-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--sage-light);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.3rem;
  margin-top: 1.2rem;
}
.size-card .size-icon {
  font-size: 2.4rem;
  flex-shrink: 0;
}
.size-card h3 { color: var(--sage); font-size: 1.05rem; margin-bottom: .1rem; text-transform: capitalize; }
.size-card .size-stats { font-size: .85rem; color: #4b5a44; }

.info-card { margin-top: 1rem; }
.info-card h4 { font-size: .95rem; color: var(--rose-deep); margin-bottom: .3rem; }
.info-card p { font-size: .95rem; color: var(--plum); margin-bottom: 0; }

.encouragement-card {
  background: var(--white);
  border: 1.5px dashed var(--gold);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  margin-top: 1rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--rose-deep);
}

.week-strip {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: 1rem .1rem .3rem;
  scrollbar-width: thin;
}
.week-chip {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-weight: 700;
  color: var(--rose-deep);
  font-size: .85rem;
}
.week-chip.active { background: var(--rose-deep); color: var(--white); border-color: var(--rose-deep); }

/* ---------- Section headers ---------- */

.section-header { margin-bottom: 1rem; }
.section-header h2 { font-size: 1.4rem; }
.section-header p { color: #6f5a63; font-size: .93rem; margin-bottom: 0; }

/* ---------- Symptom guide ---------- */

.symptom-section { margin-bottom: 1.4rem; }
.symptom-section h3 { font-size: 1.05rem; color: var(--sage); margin-bottom: .7rem; }
.symptom-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .9rem 1rem;
  margin-bottom: .6rem;
}
.symptom-card strong { color: var(--rose-deep); display: block; margin-bottom: .2rem; }
.symptom-card p { margin: 0; font-size: .92rem; }

/* ---------- Kick counter ---------- */

.kick-counter-card { text-align: center; padding: 2rem 1.3rem; }
.kick-count-display {
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--rose-deep);
  line-height: 1;
}
.kick-time-display { color: #8a7b83; margin-top: .2rem; }
#kick-tap-btn {
  margin-top: 1.4rem;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: none;
  background: var(--rose-deep);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.2rem;
  box-shadow: 0 10px 30px -8px rgba(126,58,82,.5);
  transition: transform .1s ease;
}
#kick-tap-btn:active { transform: scale(.94); }
.kick-actions { margin-top: 1.3rem; }

.kick-guidance {
  background: var(--sage-light);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  font-size: .9rem;
  color: #4b5a44;
  margin-top: 1.2rem;
}

.kick-history-row {
  display: flex;
  justify-content: space-between;
  font-size: .88rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}
.kick-history-row:last-child { border-bottom: none; }

/* ---------- Names ---------- */

.name-filters {
  display: flex;
  gap: .6rem;
  margin-bottom: 1rem;
}
.name-filters select, .name-filters input { flex: 1; }

.name-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  margin-bottom: .55rem;
}
.name-card strong { font-family: var(--font-display); font-size: 1.15rem; display: block; }
.name-card .name-meta { font-size: .82rem; color: #8a7b83; }
.name-card.highlight { border-color: var(--gold); background: #FBF3E4; }

.save-name-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--rose);
  line-height: 1;
  padding: .3rem;
}
.save-name-btn.saved { color: var(--rose-deep); }

.saved-names-box { margin-top: 1.3rem; }
.saved-names-box h4 { font-size: .95rem; }
#saved-names-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.saved-chip {
  background: var(--blush);
  color: var(--rose-deep);
  border-radius: 999px;
  padding: .35rem .9rem;
  font-size: .85rem;
  font-weight: 700;
}

/* ---------- Birth plan ---------- */

#birth-plan-form { display: flex; flex-direction: column; gap: 1.1rem; }
.plan-group h4 { font-size: .9rem; margin-bottom: .5rem; color: var(--sage); }
.plan-field { margin-bottom: .7rem; }
.plan-field label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: .3rem; color: var(--rose-deep); }
.checkbox-field { display: flex; align-items: center; gap: .5rem; }
.checkbox-field input { width: auto; }
.checkbox-field label { margin: 0; font-weight: 400; color: var(--plum); }
textarea { resize: vertical; min-height: 70px; }

#birth-plan-output {
  white-space: pre-wrap;
  background: var(--blush);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  font-size: .88rem;
  margin-top: 1.2rem;
  font-family: 'Courier New', monospace;
}

.plan-buttons { display: flex; gap: .7rem; flex-wrap: wrap; }

/* ---------- Disclaimer page ---------- */

.disclaimer-full {
  background: var(--white);
  border: 1.5px solid var(--rose-deep);
  border-radius: var(--radius-md);
  padding: 1.4rem;
}
.disclaimer-full h3 { font-size: 1rem; margin-top: 1.1rem; }
.disclaimer-full h3:first-child { margin-top: 0; }
.disclaimer-full p { font-size: .93rem; }

/* ---------- Footer ---------- */

footer {
  text-align: center;
  padding: 2rem 1rem 1rem;
  font-size: .8rem;
  color: #8a7b83;
}
footer a { color: #8a7b83; }

/* ---------- Bottom tab bar ---------- */

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: .4rem .2rem calc(.4rem + env(safe-area-inset-bottom));
  z-index: 50;
}
.tab-btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  font-size: .68rem;
  color: #a48f97;
  padding: .3rem 0;
  border-radius: var(--radius-sm);
}
.tab-btn .icon { font-size: 1.25rem; }
.tab-btn.active { color: var(--rose-deep); }

/* ---------- Responsive ---------- */

@media (min-width: 560px) {
  .week-hero .big-week { font-size: 5rem; }
  .kick-count-display { font-size: 6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
