/* The Tool Bakery — Ovulation & Fertility Calendar (modern dark theme) */
body .ttb-ofc, .ttb-ofc * { box-sizing: border-box; }
.ttb-ofc {
  --bg: #111;
  --card: #1a1a1a;
  --text: #fff;
  --muted: #9aa0a6;
  --border: #2a2a2a;
  --accent: #22c55e;      /* buttons / highlights */
  --accent-strong: #16a34a;
  --danger: #ef4444;      /* (not used by markup, reserved) */
  --ovulation: #fde047;   /* ovulation highlight */
  --fertile: #22c55e;     /* fertile window */
  background: transparent;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, Helvetica, sans-serif;
  max-width: 880px;
  margin: 0 auto;
  padding: 16px;
  border-radius: 16px;
}

.ttb-ofc { background-color: #000; }

/* Titles: keep white to avoid theme bleed */
.ttb-ofc h2,
.ttb-ofc h3 { color: #fff; margin: 0 0 12px 0; }
.ttb-ofc h2 { font-size: 1.75rem; line-height: 1.2; }
.ttb-ofc h3 { font-size: 1.125rem; color: #fff; }

/* Card-style sections */
.ttb-ofc-inputs,
.ttb-ofc-results {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

/* Inputs */
.ttb-ofc-inputs { display: grid; gap: 12px; margin-bottom: 12px; }
.ttb-ofc-inputs label { color: #fff; font-weight: 600; display: grid; gap: 6px; }
.ttb-ofc-inputs input[type="date"],
.ttb-ofc-inputs input[type="number"]{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0f0f0f;
  border: 1px solid var(--border);
  color: #fff;
  outline: none;
}
.ttb-ofc-inputs input:focus {
  border-color: #3b3b3b;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.05);
}

/* Primary button */
#ofc-calc,
.ttb-ofc-export button {
  background: var(--accent);
  color: #000;
  border: 1px solid var(--accent-strong);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .2s ease, background .2s ease;
}
#ofc-calc:hover,
.ttb-ofc-export button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(34,197,94,0.3); }
#ofc-calc:active,
.ttb-ofc-export button:active { transform: translateY(0); }

/* Export button row */
.ttb-ofc-export {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* Results area */
.ttb-ofc-results p {
  margin: 6px 0;
  color: #fff;
}
.ttb-ofc-results strong { color: #fff; }

/* Calendar container */
#ofc-calendar { margin-top: 12px; }

/* Calendar table */
.ofc-cal {
  width: 100%;
  border-collapse: separate;
  border-spacing: 6px;
  background: transparent;
  table-layout: fixed;
}
.ofc-cal td {
  background: #121212;
  border: 1px solid var(--border);
  color: #fff;
  text-align: center;
  padding: 12px 6px;
  border-radius: 10px;
  min-height: 46px;
  vertical-align: middle;
  position: relative;
  transition: transform .05s ease, box-shadow .2s ease;
}
.ofc-cal td:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

/* Fertile window highlight (from your existing td.fertile) */
.ofc-cal td.fertile {
  background: rgba(34,197,94,0.18);
  border-color: #1f9d57;
  box-shadow: inset 0 0 0 1px rgba(34,197,94,0.35);
}

/* Ovulation day highlight (from your existing td.ov) */
.ofc-cal td.ov {
  background: #17140a;
  border-color: #a08914;
  box-shadow: inset 0 0 0 2px var(--ovulation);
  font-weight: 800;
}

/* Empty cells (if you render them at month edges) */
.ofc-cal td:empty {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

/* Helpers: badges (optional, if you print labels inside cells) */
.ofc-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: .675rem;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  color: #000;
  background: var(--ovulation);
}
.ofc-cal td.fertile .ofc-badge {
  background: var(--fertile);
  color: #001b07;
}

/* Muted text utility */
.ttb-muted { color: var(--muted); }

/* Responsiveness */
@media (max-width: 900px){
  .ttb-ofc { padding: 12px; }
  .ofc-cal td { padding: 10px 4px; }
}
@media (max-width: 560px){
  .ttb-ofc { padding: 10px; }
  .ttb-ofc-inputs { gap: 10px; }
  .ofc-cal { border-spacing: 4px; }
  .ofc-cal td { padding: 8px 4px; border-radius: 8px; }
}

/* Print cleanup (used with hidden iframe print) */
@media print {
  .ttb-ofc { background: #fff; color:#000; }
  .ttb-ofc h2, .ttb-ofc h3 { color:#000 !important; }
  .ttb-ofc-inputs { display: none !important; }
  .ttb-ofc-export { display: none !important; }
  .ofc-cal td { color:#000; background:#fff; border-color:#999; box-shadow:none; }
  .ofc-cal td.fertile { background:#f3fff7; border-color:#8ad4a8; }
  .ofc-cal td.ov { background:#fff8d1; border-color:#cbae1d; }
}

.ofc-month-title {
	text-align: center;
	font-size: 32px;
}

/* Print styles for ovulation day */
@media print {
  .ofc-cal td.ov {
    background:#e0e0e0 !important; /* light grey for ovulation */
  }
}

/* PNG export styles: force white text */
.png-export {
  color:#fff !important;
}
.png-export table td,
.png-export h3,
.png-export p {
  color:#fff !important;
  border-color:#fff !important;
}