/* ═══════════════════════════════════════════════════════════════════════════
   BGW Pregnancy Due Date Calculator — /tools/pregnancy-due-date-calculator/
   ---------------------------------------------------------------------------
   Third distinct metaphor in the tool family:
     registry   → filter rail + ledger rows   (decisions)
     size chart → range bars + brand rows     (measurement)
     due date   → TIMELINE with milestones    (time)

   The timeline is the differentiator: most calculators give you one number and
   stop. This shows every date that actually matters during the pregnancy.

   Palette: house system. Card rgb(43,42,40) · text rgb(247,242,234) FULL.
   ═══════════════════════════════════════════════════════════════════════════ */

.bgw-duedate {
	--ink:   #F7F2EA;
	--mint:  rgb(143, 179, 159);
	--mint-d:rgb(110, 150, 128);
	--line:  rgba(255, 255, 255, .10);
	--line-s:rgba(255, 255, 255, .06);
	--field: rgba(255, 255, 255, .055);
	--muted: rgba(247, 242, 234, .6);
	--void:  rgb(43, 42, 40);
	--rose:  #D98F9A;
	--amber: #E3D3A2;
	color: var(--ink);
}
.bgw-duedate .dd-card {
	background: var(--void);
	border: 1px solid var(--line);
	border-radius: 10px;
	color: var(--ink);
}
.bgw-duedate .dd-card + .dd-card { margin-top: 20px; }

/* ── method tabs ────────────────────────────────────────────────────────── */
.bgw-duedate .dd-methods {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 20px 22px 0;
}
.bgw-duedate .dd-method {
	appearance: none;
	border: 1px solid var(--line);
	background: transparent;
	color: var(--ink);
	font: inherit;
	font-size: .86rem;
	font-weight: 600;
	padding: 9px 15px;
	border-radius: 999px;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.bgw-duedate .dd-method:hover { background: rgba(143,179,159,.14); border-color: var(--mint); }
.bgw-duedate .dd-method[aria-selected="true"] { background: var(--mint); color: #fff; border-color: var(--mint); }
.bgw-duedate .dd-method:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

/* ── input panel ────────────────────────────────────────────────────────── */
.bgw-duedate .dd-panel { padding: 20px 22px 22px; }
.bgw-duedate .dd-panel[hidden] { display: none; }
.bgw-duedate .dd-fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 16px;
}
.bgw-duedate .dd-field label {
	display: block;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 7px;
}
.bgw-duedate .dd-field input,
.bgw-duedate .dd-field select {
	width: 100%;
	box-sizing: border-box;
	background: var(--field);
	border: 1px solid var(--line);
	border-radius: 6px;
	color: var(--ink);
	font: inherit;
	font-size: .98rem;
	padding: 11px 12px;
	-webkit-appearance: none;
	appearance: none;
}
.bgw-duedate .dd-field input:focus,
.bgw-duedate .dd-field select:focus { outline: 0; border-color: var(--mint); }
.bgw-duedate .dd-field select option { background: var(--void); color: var(--ink); }
.bgw-duedate .dd-radios { display: flex; gap: 18px; align-items: center; }
.bgw-duedate .dd-radios label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: .92rem; text-transform: none; letter-spacing: 0; font-weight: 500; cursor: pointer; }
.bgw-duedate .dd-radios input { width: 17px; height: 17px; accent-color: rgb(143,179,159); }
.bgw-duedate .dd-hint { margin: 14px 0 0; font-size: .85rem; line-height: 1.6; color: var(--muted); }

/* ── the big answer ─────────────────────────────────────────────────────── */
.bgw-duedate .dd-answer {
	margin: 20px 22px 0;
	padding: 22px;
	border-left: 4px solid var(--mint);
	background: rgba(143,179,159,.10);
	border-radius: 0 8px 8px 0;
}
.bgw-duedate .dd-answer .who {
	font-size: .68rem; font-weight: 700; letter-spacing: .13em;
	text-transform: uppercase; color: var(--mint); margin: 0 0 6px;
}
.bgw-duedate .dd-answer .date {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 2.3rem; font-weight: 600; line-height: 1.05;
	color: var(--ink); margin: 0;
}
.bgw-duedate .dd-answer .sub { margin: 8px 0 0; font-size: .95rem; line-height: 1.6; color: var(--ink); }
.bgw-duedate .dd-answer .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bgw-duedate .dd-chip {
	font-size: .74rem; font-weight: 700; letter-spacing: .05em;
	padding: 5px 11px; border-radius: 999px;
	background: rgba(255,255,255,.08); color: var(--ink);
}
.bgw-duedate .dd-chip.on { background: var(--mint); color: #fff; }
.bgw-duedate .dd-answer.is-empty { border-left-color: var(--line); background: rgba(255,255,255,.03); }
.bgw-duedate .dd-answer.is-empty .who { color: var(--muted); }

/* ── the TIMELINE ───────────────────────────────────────────────────────── */
.bgw-duedate .dd-timeline { padding: 22px; }
.bgw-duedate .dd-timeline h3 {
	margin: 0 0 4px;
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 1.4rem; font-weight: 600; color: var(--ink);
}
.bgw-duedate .dd-tl-legend { margin: 0 0 22px; font-size: .85rem; line-height: 1.6; color: var(--muted); }

.bgw-duedate .dd-tl { position: relative; padding-left: 26px; }
.bgw-duedate .dd-tl::before {
	content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
	width: 2px; background: var(--line);
}
.bgw-duedate .dd-stop {
	position: relative;
	padding: 0 0 20px;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 12px;
	align-items: baseline;
}
.bgw-duedate .dd-stop:last-child { padding-bottom: 0; }
.bgw-duedate .dd-stop::before {
	content: ""; position: absolute; left: -25px; top: 6px;
	width: 12px; height: 12px; border-radius: 50%;
	background: var(--void); border: 2px solid var(--mint);
	box-sizing: border-box;
}
.bgw-duedate .dd-stop.is-past::before { background: var(--mint); }
.bgw-duedate .dd-stop.is-now::before {
	background: var(--amber); border-color: var(--amber);
	box-shadow: 0 0 0 4px rgba(227,211,162,.22);
}
.bgw-duedate .dd-stop .lbl { font-size: .96rem; font-weight: 600; color: var(--ink); }
.bgw-duedate .dd-stop.is-past .lbl { color: var(--muted); }
.bgw-duedate .dd-stop .dt {
	font-size: .88rem; font-weight: 700; color: var(--ink);
	font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap;
}
.bgw-duedate .dd-stop.is-past .dt { color: var(--muted); }
.bgw-duedate .dd-stop .note {
	grid-column: 1 / -1; margin: 3px 0 0;
	font-size: .84rem; line-height: 1.55; color: var(--muted);
}

/* ── week-by-week, as cards ─────────────────────────────────────────────── */
.bgw-duedate .dd-allweeks { padding: 22px; }
.bgw-duedate .dd-allweeks h3 {
	margin: 0 0 4px;
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 1.4rem; font-weight: 600; color: var(--ink);
}
.bgw-duedate .dd-allweeks h3 + h3 { margin-top: 34px; }
.bgw-duedate .dd-explain {
	margin: 0 0 20px; padding: 14px 18px;
	border-left: 3px solid var(--mint);
	background: rgba(143,179,159,.10);
	font-size: .93rem; line-height: 1.65; color: var(--ink);
}
.bgw-duedate .dd-explain strong { color: #fff; }

.bgw-duedate .dd-trihead {
	display: flex; align-items: baseline; gap: 12px;
	margin: 0 0 16px; padding-bottom: 10px;
	border-bottom: 1px solid var(--line);
}
.bgw-duedate .dd-trihead .tn {
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 1.35rem; font-weight: 600; color: var(--ink);
}
.bgw-duedate .dd-trihead .tr {
	font-size: .72rem; font-weight: 700; letter-spacing: .12em;
	text-transform: uppercase; color: var(--mint); margin-left: auto;
}

.bgw-duedate .dd-wkgrid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 14px;
	margin: 0 0 30px;
	padding: 0; list-style: none;
}
.bgw-duedate .dd-wkcard2 {
	position: relative;
	background: rgba(255,255,255,.035);
	border: 1px solid var(--line-s);
	border-radius: 10px;
	padding: 16px 18px 18px;
	overflow: hidden;
	transition: border-color .16s ease, background .16s ease;
}
.bgw-duedate .dd-wkcard2:hover { border-color: var(--mint); background: rgba(143,179,159,.07); }
.bgw-duedate .dd-wkcard2 .wk {
	margin: 0 0 3px;
	font-size: .66rem; font-weight: 700; letter-spacing: .14em;
	text-transform: uppercase; color: var(--mint);
}
.bgw-duedate .dd-wkcard2 .fruit {
	margin: 0 0 10px;
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 1.32rem; font-weight: 600; line-height: 1.2; color: #fff;
}
.bgw-duedate .dd-wkcard2 .dev {
	margin: 0; font-size: .88rem; line-height: 1.6; color: var(--ink);
}
/* the growth bar — week / 40, so you can see it fill up as you scroll */
.bgw-duedate .dd-wkcard2 .grow {
	display: block; height: 3px; border-radius: 999px;
	background: rgba(255,255,255,.10); margin: 0 0 12px; overflow: hidden;
}
.bgw-duedate .dd-wkcard2 .grow i {
	display: block; height: 100%; background: var(--mint); border-radius: 999px;
}
.bgw-duedate .dd-wkcard2 .stamp {
	position: absolute; right: 14px; top: 12px;
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 1.7rem; font-weight: 600; line-height: 1;
	color: rgba(255,255,255,.10);
}

@media print {
	.bgw-duedate .dd-wkgrid { grid-template-columns: repeat(3, 1fr); }
	.bgw-duedate .dd-wkcard2 { border-color: #ccc !important; background: #fff !important; }
	.bgw-duedate .dd-wkcard2 .fruit { color: #000 !important; }
	.bgw-duedate .dd-wkcard2 .stamp { display: none; }
}

.bgw-duedate .dd-weeks { padding: 22px; }
.bgw-duedate .dd-weeks h3 {
	margin: 0 0 4px;
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 1.4rem; font-weight: 600; color: var(--ink);
}
.bgw-duedate .dd-strip {
	display: flex; gap: 6px; overflow-x: auto; padding: 6px 0 12px;
	scrollbar-width: thin;
}
.bgw-duedate .dd-wk {
	flex: 0 0 auto;
	width: 62px; padding: 10px 4px;
	border: 1px solid var(--line); border-radius: 8px;
	text-align: center; background: rgba(255,255,255,.03);
}
.bgw-duedate .dd-wk .n { display: block; font-size: .82rem; font-weight: 700; color: var(--ink); }
.bgw-duedate .dd-wk .f { display: block; font-size: .66rem; color: var(--muted); margin-top: 3px; line-height: 1.25; }
.bgw-duedate .dd-wk.is-now { background: var(--mint); border-color: var(--mint); }
.bgw-duedate .dd-wk.is-now .n, .bgw-duedate .dd-wk.is-now .f { color: #fff; }

.bgw-duedate .dd-weekcard {
	margin-top: 6px; padding: 18px 20px;
	background: rgba(255,255,255,.035);
	border: 1px solid var(--line-s); border-radius: 8px;
}
.bgw-duedate .dd-weekcard .hd {
	margin: 0 0 6px; font-size: .68rem; font-weight: 700; letter-spacing: .12em;
	text-transform: uppercase; color: var(--mint);
}
.bgw-duedate .dd-weekcard .ft {
	margin: 0 0 8px; font-family: 'Cormorant Garamond', Georgia, serif;
	font-size: 1.5rem; font-weight: 600; color: var(--ink);
}
.bgw-duedate .dd-weekcard .dv { margin: 0; font-size: .92rem; line-height: 1.65; color: var(--ink); }

@media (max-width: 560px) {
	.bgw-duedate .dd-stop { grid-template-columns: 1fr; }
	.bgw-duedate .dd-stop .dt { text-align: left; }
}

@media print {
	.bgw-duedate .dd-methods, .bgw-duedate .dd-radios, .bgw-duedate .bgw-noprint { display: none !important; }
	.bgw-duedate .dd-card, .bgw-duedate .dd-answer { background: #fff !important; border-color: #ccc !important; }
	.bgw-duedate .dd-answer .date, .bgw-duedate .dd-answer .who, .bgw-duedate .dd-answer .sub,
	.bgw-duedate .dd-stop .lbl, .bgw-duedate .dd-stop .dt, .bgw-duedate .dd-stop .note,
	.bgw-duedate h3, .bgw-duedate .dd-weekcard .ft, .bgw-duedate .dd-weekcard .dv { color: #000 !important; }
	.bgw-duedate .dd-chip { background: #eee !important; color: #000 !important; }
}

/* ── medical disclaimer ─────────────────────────────────────────────────────
   This site is YMYL. It states general information and never advises. The
   disclaimer is deliberately visible above the tool, not buried in a footer.
   ──────────────────────────────────────────────────────────────────────────── */
.bgw-duedate .dd-ymyl {
	background: rgba(227, 211, 162, .10);
	border: 1px solid rgba(227, 211, 162, .30);
	border-radius: 8px;
	padding: 15px 18px;
	margin: 0 0 20px;
}
.bgw-duedate .dd-ymyl p {
	margin: 0;
	font-size: .88rem;
	line-height: 1.6;
	color: var(--ink);
}
.bgw-duedate .dd-ymyl p + p { margin-top: 9px; }
.bgw-duedate .dd-ymyl strong { color: #fff; }

/* BGW-CONTRAST-FILL */
/* Brand mint rgb(143,179,159) with white text measures 2.30:1 — fails WCAG AA.
   Anything carrying WHITE text uses this darker green instead: 4.80:1.
   The light mint remains for accents, borders and dark-text fills. */
.bgw-gender .fit-buy,
.bgw-hospital .fit-buy,
.bgw-gender .gq-start,
.bgw-gender .gq-opt.chosen,
.bgw-gender .gq-badge,
.bgw-hospital .hbc-badge.essential,
.bgw-registry .fit-buy,
.bgw-sizechart .fit-buy,
.bgw-duedate .fit-buy,
.bgw-duedate .dd-chip.on,
a.fit-buy,
button.gq-start {
	background: rgb(86, 122, 102) !important;
	border-color: rgb(86, 122, 102) !important;
	color: #fff !important;
}
.bgw-gender .fit-buy:hover,
.bgw-hospital .fit-buy:hover,
.bgw-gender .gq-start:hover,
a.fit-buy:hover,
button.gq-start:hover {
	background: rgb(74, 106, 89) !important;
	border-color: rgb(74, 106, 89) !important;
}
