/* ==========================================================================
   Karta Ciąży — moduł „Plan wizyt” (wizyty.css)
   Korzysta wyłącznie ze zmiennych z style.css (jasny i ciemny motyw).
   Animacje tylko transform/opacity; [data-noanim] wyłącza je w całości.
   ========================================================================== */
.wiz .card__title svg { width: 20px; height: 20px; color: var(--brand); flex: none; }
.wiz-today { font-size: 13px; }
.wiz-sum { margin: -4px 0 14px; }

/* ---------- oś czasu ---------- */
.wiz-list { list-style: none; margin: 0; padding: 0; position: relative; }
.wiz-item { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0 12px; padding-bottom: 14px; }
.wiz-item:last-child { padding-bottom: 0; }
.wiz-item::before { /* linia łącząca kropki */
  content: ""; position: absolute; left: 14px; top: 30px; bottom: -2px; width: 2px; background: var(--border);
}
.wiz-item:last-child::before { display: none; }
.wiz-item--done::before { background: var(--ok); opacity: .55; }
.wiz-dot {
  position: relative; z-index: 1; width: 30px; height: 30px; margin-top: 12px; border-radius: 50%;
  border: 2px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; color: #fff;
}
.wiz-dot svg { width: 16px; height: 16px; }
.wiz-item--done .wiz-dot { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.wiz-item--next .wiz-dot { border-color: var(--brand); background: var(--brand-soft); }
.wiz-item--next .wiz-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.wiz-item--late .wiz-dot { border-color: var(--danger); }

.wiz-body {
  min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px 14px;
  background: var(--surface);
}
.wiz-item--next .wiz-body, .wiz-item--hl .wiz-body { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.wiz-item--done .wiz-body { background: var(--surface-2); }
.wiz-item--late .wiz-body { border-color: var(--danger); }
.wiz--breeder .wiz-item--late .wiz-body { border-color: var(--border); }

.wiz-top { display: flex; gap: 8px 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.wiz-when { display: flex; gap: 4px 10px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.wiz-day { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); }
.wiz-item--done .wiz-day { color: var(--ok); }
.wiz-date { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.wiz-date .muted { font-weight: 600; font-size: 14px; }
.wiz-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.wiz-badges .badge svg { width: 13px; height: 13px; }
.wiz-title { font-size: 15px; font-weight: 700; margin: 6px 0 8px; overflow-wrap: anywhere; }

/* ---------- badania ---------- */
.wiz-exams { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wiz-exam {
  display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border-radius: 999px;
  background: var(--info-soft); color: var(--text); font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; max-width: 100%;
}
.wiz-exam--skip { background: transparent; border: 1px dashed var(--border-strong); color: var(--muted); gap: 6px; flex-wrap: wrap; }
.wiz-exam--skip .wiz-exam__n { text-decoration: line-through; }
.wiz-exam__note { font-size: 12.5px; font-weight: 700; }
.wiz-exams--none { margin: 0; }

/* ---------- akcje i formularz terminu ---------- */
.wiz-act { margin-top: 12px; gap: 8px; }
.wiz-act .btn { flex: 0 1 auto; }
.wiz-form { margin-top: 12px; padding-top: 14px; border-top: 1px dashed var(--border-strong); animation: wizIn .26s cubic-bezier(.22, 1, .36, 1) both; }
.wiz-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.wiz-form .field { margin-bottom: 10px; }
.wiz-form .hint { margin: 0 0 10px; }
.wiz-form .err { margin: 0 0 10px; }
.wiz-cc { margin-top: 14px; }

/* ---------- hodowca: najbliższa wizyta ---------- */
.wiz-next {
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 14px;
  background: var(--brand-soft); border-left: 4px solid var(--brand-logo, var(--brand));
}
.wiz-next--late { background: var(--accent-soft); border-left-color: var(--accent); }
.wiz-next__lbl { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-strong); }
.wiz-next--late .wiz-next__lbl { color: var(--accent); }
.wiz-next__date { font-size: 26px; font-weight: 800; line-height: 1.2; margin-top: 2px; font-variant-numeric: tabular-nums; }
.wiz-next__date span { font-size: 16px; font-weight: 600; color: var(--muted); }
.wiz-next__rel { font-weight: 700; font-size: 14.5px; margin-top: 2px; }
.wiz-next__ex { font-size: 14px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.wiz-foot { margin-top: 14px; }

/* ---------- ustawienia: szablon ---------- */
.wiz-set__lead { margin: -4px 0 14px; }
.wiz-tlist { list-style: none; margin: 0; padding: 0; }
.wiz-tfs { padding-bottom: 14px; animation: wizIn .26s cubic-bezier(.22, 1, .36, 1) both; }
.wiz-tfs > legend { font-weight: 800; }
.wiz-tgrid { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr); gap: 0 12px; margin-top: 8px; }
.wiz-exfs { margin-bottom: 8px; }
.wiz-chks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 0 14px; }
.wiz-chk { margin-bottom: 2px; min-width: 0; }
.wiz-chk span { overflow-wrap: anywhere; }
.wiz-tfs .err { margin: 0 0 10px; }
.wiz-tcount { margin: 4px 0 12px; }
#wiz-set-h:focus { outline: none; }
#wiz-set-h:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }

/* ---------- ruch: tylko transform/opacity ---------- */
@keyframes wizIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes wizPop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); } }
@keyframes wizRise { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.wiz-pop .wiz-dot { animation: wizPop .45s cubic-bezier(.34, 1.56, .64, 1) both; }
.wiz-pop .wiz-body { animation: wizRise .35s cubic-bezier(.22, 1, .36, 1) both; }
[data-noanim] .wiz-form, [data-noanim] .wiz-tfs, [data-noanim] .wiz-pop .wiz-dot, [data-noanim] .wiz-pop .wiz-body { animation: none !important; }

/* ---------- telefon ---------- */
@media (max-width: 560px) {
  .wiz-item { grid-template-columns: 22px minmax(0, 1fr); gap: 0 8px; }
  .wiz-item::before { left: 10px; top: 26px; }
  .wiz-dot { width: 22px; height: 22px; margin-top: 14px; }
  .wiz-dot svg { width: 12px; height: 12px; }
  .wiz-item--next .wiz-dot::after { width: 8px; height: 8px; }
  .wiz-body { padding: 10px 12px 12px; }
  .wiz-act .btn { flex: 1 1 128px; padding: 0 10px; }
  .wiz-act .btn--primary, .wiz-act [data-wiz-undo] { flex-basis: 100%; }
  .wiz-form__btns .btn { flex: 1 1 100%; }
  .wiz-form__grid { grid-template-columns: minmax(0, 1fr); }
  .wiz-tgrid { grid-template-columns: minmax(0, 1fr); }
  .wiz-next__date { font-size: 22px; }
  .wiz--set .btnrow .btn { flex: 1 1 100%; }
}
@media print {
  .wiz-act, .wiz-form, .wiz--set .btnrow { display: none !important; }
}

/* wizyta 56. doby: planowany sposób porodu (16.11) */
.wiz-birth { margin: 10px 0 4px; padding: 10px 12px 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.wiz-birth > legend { font-size: 14px; font-weight: 800; padding: 0 6px; margin-left: -6px; }
.wiz-birth .seg { margin-bottom: 8px; }
.wiz-birth .hint { margin: 0 0 8px; }
.wiz-birth--ro { margin: 8px 0 0; padding: 8px 12px; font-size: 14px; line-height: 1.45; }
