/* =====================================================================
   Minha Clínica — booking wizard (/agendar/)
   Loads AFTER styles.css and reuses its design tokens (--red, --ink, …).
   Mobile-first; every tap target ≥ 48px; high contrast for older eyes.
   ===================================================================== */

.bk-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .65rem 1rem; border-bottom: 1px solid var(--line);
  background: var(--bg); position: sticky; top: 0; z-index: 20;
}
.bk-topbar img { height: 44px; width: auto; display: block; }
.bk-topbar .bk-help { display: flex; gap: .5rem; }

.bk-wrap { max-width: 44rem; margin: 0 auto; padding: 1rem 1rem 6rem; }

/* Progress (each segment is a clickable button) ------------------------ */
.bk-progress { display: flex; gap: .4rem; margin: .75rem 0 .9rem; }
.bk-progress button {
  flex: 1; height: .55rem; border-radius: 99px; background: var(--line);
  border: 0; padding: 0; cursor: default;
}
.bk-progress button.done { background: var(--red); }
.bk-progress button.link { cursor: pointer; }
.bk-progress button.link:hover { outline: 3px solid var(--red-light); }

/* Choice chips — always-visible summary of what was already picked ----- */
.bk-crumbs { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 .9rem; }
.bk-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1.5px solid var(--line); background: var(--bg-alt);
  border-radius: 99px; padding: .45rem .85rem; min-height: 42px;
  font-size: .98rem; color: var(--ink); cursor: pointer;
}
.bk-chip .ok { color: var(--tint-mint-ink); font-weight: 700; }
.bk-chip .edit { color: var(--red); font-weight: 700; text-decoration: underline; }
.bk-chip:hover { border-color: var(--red); }

.bk-step-label { font-size: 1rem; color: var(--ink-mute); margin: 0 0 .15rem; }
h1.bk-title { font-size: 1.55rem; line-height: 1.25; margin: 0 0 1rem; color: var(--ink); }

/* Back button — a real, visible button now ------------------------------ */
.bk-back { margin: 0 0 .9rem; }
.bk-back b { font-weight: 700; }

/* Option cards (specialties, units) ----------------------------------- */
.bk-search {
  width: 100%; font-size: 1.15rem; padding: .85rem 1rem; margin-bottom: .9rem;
  border: 2px solid var(--line); border-radius: .75rem; color: var(--ink);
}
.bk-search:focus { outline: 3px solid var(--red-light); border-color: var(--red); }

.bk-options { display: grid; gap: .6rem; }
.bk-card {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  width: 100%; text-align: left; background: var(--bg);
  border: 2px solid var(--line); border-radius: .9rem;
  padding: .95rem 1.1rem; min-height: 58px; cursor: pointer;
  font-size: 1.12rem; color: var(--ink); transition: border-color .12s;
}
.bk-card:hover, .bk-card:focus-visible { border-color: var(--red); }
.bk-card .bk-card__sub { display: block; font-size: .95rem; color: var(--ink-mute); margin-top: .15rem; }
.bk-card .bk-card__price { white-space: nowrap; font-weight: 700; color: var(--red); font-size: 1.05rem; }
.bk-card .bk-card__go { color: var(--red); font-weight: 700; }
.bk-card .bk-card__map {
  display: inline-block; margin-top: .4rem; color: var(--red);
  font-size: 1rem; font-weight: 700; text-decoration: underline; padding: .25rem 0;
}
.bk-badge {
  display: inline-block; background: var(--tint-mint); color: var(--tint-mint-ink);
  border-radius: 99px; padding: .15rem .6rem; font-size: .85rem; font-weight: 700;
  vertical-align: middle;
}
.bk-geo { margin-bottom: .9rem; }

/* Reschedule mode ------------------------------------------------------ */
.bk-resched-banner {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem;
  background: var(--tint-cream); border: 2px solid var(--tint-cream);
  color: var(--ink); border-radius: .9rem; padding: .85rem 1rem;
  font-size: 1.02rem; line-height: 1.5; margin: .75rem 0 .9rem;
}
.bk-resched-banner__close {
  background: none; border: 0; color: var(--tint-cream-ink); font-size: 1.5rem;
  line-height: 1; cursor: pointer; padding: 0 .2rem; flex: 0 0 auto;
}
.bk-chip--static { cursor: default; opacity: .85; }
.bk-chip--static:hover { border-color: var(--line); }
.bk-note--ok { border-color: var(--tint-mint); background: var(--tint-mint); color: var(--ink); }

/* Day strip ------------------------------------------------------------ */
.bk-days {
  display: flex; gap: .5rem; overflow-x: auto; padding: .25rem 0 .75rem;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.bk-day {
  flex: 0 0 auto; min-width: 4.6rem; min-height: 64px; padding: .5rem .6rem;
  border: 2px solid var(--line); border-radius: .8rem; background: var(--bg);
  text-align: center; cursor: pointer; color: var(--ink); font-size: 1rem;
}
.bk-day b { display: block; font-size: 1.2rem; }
.bk-day.sel { border-color: var(--red); background: var(--red-light); font-weight: 700; }

/* Professional blocks + time chips ------------------------------------- */
.bk-prof { border: 1px solid var(--line); border-radius: .9rem; padding: .9rem 1rem; margin-bottom: .8rem; }
.bk-prof h3 { margin: 0 0 .6rem; font-size: 1.1rem; color: var(--ink); }
.bk-prof--sem-horario { border: 1.5px dashed var(--line); background: var(--bg-alt); }
.bk-prof--sem-horario .bk-step-label { margin-bottom: .6rem; }
.bk-times { display: flex; flex-wrap: wrap; gap: .5rem; }
.bk-time {
  min-width: 5.2rem; min-height: 48px; font-size: 1.1rem; font-weight: 600;
  border: 2px solid var(--line); border-radius: .7rem; background: var(--bg);
  color: var(--ink); cursor: pointer;
}
.bk-time:hover, .bk-time:focus-visible { border-color: var(--red); }
.bk-time.sel { background: var(--red); border-color: var(--red); color: #fff; }

/* Form ------------------------------------------------------------------ */
.bk-form { display: grid; gap: .9rem; }
.bk-field label { display: block; font-size: 1.05rem; font-weight: 600; color: var(--ink); margin-bottom: .3rem; }
.bk-field input {
  width: 100%; font-size: 1.15rem; padding: .85rem 1rem;
  border: 2px solid var(--line); border-radius: .75rem; color: var(--ink);
}
.bk-field input:focus { outline: 3px solid var(--red-light); border-color: var(--red); }
.bk-field .bk-err { display: none; color: var(--red-dark); font-size: .95rem; margin-top: .3rem; }
.bk-field.invalid input { border-color: var(--red-dark); }
.bk-field.invalid .bk-err { display: block; }

.bk-radio-row { display: flex; gap: .6rem; }
.bk-radio-row label {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: .5rem;
  border: 2px solid var(--line); border-radius: .75rem; min-height: 52px;
  font-size: 1.1rem; cursor: pointer; color: var(--ink);
}
.bk-radio-row input { position: absolute; opacity: 0; }
.bk-radio-row label.sel { border-color: var(--red); background: var(--red-light); font-weight: 700; }

.bk-consent { display: flex; gap: .6rem; align-items: flex-start; font-size: 1rem; color: var(--ink-soft); }
.bk-consent input { width: 1.4rem; height: 1.4rem; margin-top: .1rem; flex: 0 0 auto; }

/* Honeypot — invisible to humans, tempting to bots */
.bk-hp { position: absolute; left: -6000px; top: -6000px; }

/* Summary / confirmation ------------------------------------------------ */
.bk-summary { border: 2px solid var(--line); border-radius: 1rem; padding: 1.1rem 1.2rem; display: grid; gap: .55rem; }
.bk-summary div { display: flex; justify-content: space-between; gap: 1rem; font-size: 1.08rem; }
.bk-summary dt { color: var(--ink-mute); }
.bk-summary dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; }

.bk-pay { margin-top: 1rem; display: grid; gap: .6rem; }
.bk-pay .soonnote { font-size: .95rem; color: var(--ink-mute); }

/* Sticky continue bar ---------------------------------------------------- */
.bk-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--bg); border-top: 1px solid var(--line);
  padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
  display: flex; justify-content: center;
}
.bk-cta .btn { width: 100%; max-width: 42rem; min-height: 54px; font-size: 1.2rem; }
.bk-cta .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Success ----------------------------------------------------------------- */
.bk-success { text-align: center; padding: 2rem 0; }
.bk-success .ok-ic {
  width: 76px; height: 76px; border-radius: 50%; background: var(--tint-mint);
  color: var(--tint-mint-ink); display: inline-flex; align-items: center; justify-content: center;
  font-size: 2.4rem; margin-bottom: 1rem;
}
.bk-success h2 { font-size: 1.5rem; margin: .2rem 0 1rem; }
.bk-success .bk-summary { text-align: left; margin: 0 auto 1.4rem; max-width: 30rem; }

/* Pix payment box on the success screen --------------------------------- */
.bk-pix {
  text-align: left; margin: 0 auto 1.4rem; max-width: 30rem;
  border: 2px solid var(--tint-mint); background: var(--tint-mint);
  border-radius: 1rem; padding: 1.1rem 1.2rem;
}
.bk-pix h3 { margin: 0 0 .7rem; font-size: 1.15rem; color: var(--ink); }
.bk-pix__code {
  width: 100%; font-size: .95rem; font-family: monospace; color: var(--ink);
  padding: .7rem .8rem; border: 2px solid var(--line); border-radius: .7rem;
  background: #fff; resize: vertical; margin-bottom: .7rem;
}
.bk-pix .btn { width: 100%; }
.bk-pix__note { margin: .7rem 0 0; font-size: .92rem; color: var(--ink-soft); }

/* Status / error panel ------------------------------------------------------ */
.bk-note {
  border: 2px solid var(--red-band); background: var(--red-light);
  border-radius: 1rem; padding: 1rem 1.1rem; font-size: 1.05rem; color: var(--ink);
  display: grid; gap: .8rem;
}
.bk-note .bk-note-ctas { display: flex; flex-wrap: wrap; gap: .6rem; }

.bk-loading { display: flex; align-items: center; gap: .7rem; color: var(--ink-mute); font-size: 1.05rem; padding: 1rem 0; }
.bk-spin {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  border: 3px solid var(--line); border-top-color: var(--red);
  animation: bkspin .8s linear infinite;
}
@keyframes bkspin { to { transform: rotate(360deg); } }

@media (min-width: 640px) {
  h1.bk-title { font-size: 1.8rem; }
  .bk-options.two { grid-template-columns: 1fr 1fr; }
}
