/* Blog tools: deadline checker, inline WhatsApp prompts, numbered steps,
   compact contents. 2026-11-28. Uses the site's --bf-* tokens. */
/* Token fallbacks for pages outside the blog template (same values as site.css). */
:root {
  --bf-navy: #0d1b2a; --bf-navy-soft: #1a2c45; --bf-gold: #76591b; --bf-gold-soft: #e8d7a7;
  --bf-line: #dce2ea; --bf-muted: #5e6878; --bf-sage: #5e7a6b; --bf-soft: #f7f9fc;
  --bf-text: #1f2833; --bf-wa: #137a37; --bf-warm: #f7f2e7;
}


/* ---------- Deadline checker ---------- */
.bt-check {
  margin: 8px 0 36px;
  padding: 26px 24px 24px;
  background: var(--bf-warm);
  border: 1px solid var(--bf-gold-soft);
  border-radius: 14px;
}
.blog-final-article article .bt-check h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 3vw, 32px);
}
.bt-check > p {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--bf-text);
}
.bt-check__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 16px;
  align-items: end;
}
.bt-check__field { display: grid; gap: 6px; min-width: 0; }
.bt-check__field label {
  font-size: 14px;
  font-weight: 700;
  color: var(--bf-navy);
}
.bt-check__field small {
  font-size: 13px;
  line-height: 1.4;
  color: var(--bf-muted);
}
.bt-check__field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
  color: var(--bf-text);
  background: #fff;
  border: 1px solid #b9c3cf;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}
.bt-check__field input:focus-visible {
  outline: 3px solid var(--bf-navy);
  outline-offset: 1px;
  border-color: var(--bf-navy);
}
.bt-check__field input[aria-invalid="true"] { border-color: #a12a2a; }
.bt-check__form button {
  min-height: 48px;
  padding: 10px 20px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--bf-navy);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color .18s ease-out;
}
.bt-check__form button:hover { background: var(--bf-navy-soft); }
.bt-check__form button:focus-visible { outline: 3px solid var(--bf-gold); outline-offset: 2px; }

.bt-check__result {
  margin-top: 18px;
  padding: 18px 18px 16px;
  background: #fff;
  border: 1px solid var(--bf-line);
  border-radius: 12px;
}
.bt-check__result[hidden] { display: none; }
.bt-check__result strong.bt-check__verdict {
  display: block;
  margin-bottom: 6px;
  font-family: var(--serif, "Cormorant Garamond", Georgia, serif);
  font-size: 24px;
  line-height: 1.2;
  color: var(--bf-navy);
}
.bt-check__result[data-state="late"] strong.bt-check__verdict { color: #8a1f1f; }
.bt-check__result[data-state="ok"] strong.bt-check__verdict { color: var(--bf-sage); }
.bt-check__result p {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.6;
}
.bt-check__result p:last-of-type { margin-bottom: 14px; }
.bt-check__note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--bf-muted);
}

/* ---------- WhatsApp button used inside the article ---------- */
.bt-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff !important;
  text-decoration: none !important;
  background: var(--bf-wa);
  border-radius: 10px;
  box-shadow: 0 6px 16px -8px rgba(19, 122, 55, .55);
  transition: background-color .18s ease-out, box-shadow .18s ease-out;
}
.bt-wa:hover { background: #0f6a2f; box-shadow: 0 8px 20px -8px rgba(19, 122, 55, .65); }
.bt-wa:focus-visible { outline: 3px solid var(--bf-navy); outline-offset: 3px; }
.bt-wa svg { width: 20px; height: 20px; flex: none; }

/* ---------- Inline prompt between sections ---------- */
.bt-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 24px;
  align-items: center;
  margin: 30px 0 34px;
  padding: 20px 22px;
  background: var(--bf-soft);
  border: 1px solid var(--bf-line);
  border-radius: 14px;
}
.bt-cta p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--bf-text);
}
.bt-cta p strong {
  display: block;
  margin-bottom: 2px;
  font-size: 17px;
  color: var(--bf-navy);
}
@media (max-width: 640px) {
  .bt-cta { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .bt-cta .bt-wa, .bt-check .bt-wa { width: 100%; }
}

/* ---------- Numbered steps (sequence matters) ---------- */
.blog-final-article article ol.bt-steps {
  list-style: none;
  counter-reset: bt-step;
  padding-left: 0;
  margin: 8px 0 26px;
}
.blog-final-article article ol.bt-steps > li {
  counter-increment: bt-step;
  position: relative;
  padding: 0 0 18px 52px;
  margin: 0;
}
.blog-final-article article ol.bt-steps > li::before {
  content: counter(bt-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: var(--bf-navy);
  border-radius: 50%;
}
.blog-final-article article ol.bt-steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16.5px;
  top: 38px;
  bottom: 4px;
  width: 1px;
  background: var(--bf-line);
}
.blog-final-article article ol.bt-steps > li::marker { content: none; }

/* ---------- Worked example ---------- */
.bt-example {
  margin: 8px 0 26px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--bf-line);
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.7;
}
.bt-example p { margin: 0 0 8px; }
.bt-example p:last-child { margin: 0; }
.bt-example .num { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--bf-navy); }

/* ---------- Contents: collapsible on small screens ---------- */
.blog-final-post .bt-toc summary {
  display: none;
}
@media (max-width: 1100px) {
  .blog-final-post .bt-toc {
    border: 1px solid var(--bf-line);
    border-radius: 12px;
    background: #fff;
    padding: 0 16px;
  }
  .blog-final-post .bt-toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    font-weight: 700;
    color: var(--bf-navy);
    cursor: pointer;
    list-style: none;
  }
  .blog-final-post .bt-toc summary::-webkit-details-marker { display: none; }
  .blog-final-post .bt-toc summary::after {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--bf-navy);
    border-bottom: 2px solid var(--bf-navy);
    transform: rotate(45deg) translateY(-3px);
    transition: transform .2s ease-out;
  }
  .blog-final-post .bt-toc[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
  .blog-final-post .bt-toc > strong { display: none; }
  .blog-final-post .bt-toc a:last-child { border-bottom: 0; }
}

/* Floating WhatsApp label */
.blog-final-float.bt-float { font-size: 0; }
.blog-final-float.bt-float svg { width: 28px; height: 28px; }

/* Aviso prévio radios */
.bt-check__aviso { border: 0; padding: 0; margin: 0; grid-column: 1 / -1; }
.bt-check__aviso legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--bf-navy); }
.bt-check__radios { display: flex; flex-wrap: wrap; gap: 8px; }
.bt-check__radios label {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 14px;
  font-size: 15px; font-weight: 600; color: var(--bf-text);
  background: #fff; border: 1px solid #b9c3cf; border-radius: 999px; cursor: pointer;
  transition: border-color .15s ease-out, background-color .15s ease-out;
}
.bt-check__radios input { accent-color: var(--bf-navy); width: 18px; height: 18px; margin: 0; }
.bt-check__radios label:has(input:checked) { border-color: var(--bf-navy); background: #eef2f7; color: var(--bf-navy); }
.bt-check__radios label:has(input:focus-visible) { outline: 3px solid var(--bf-navy); outline-offset: 2px; }
.bt-check__result:focus { outline: none; }
.bt-check__cta-text { font-size: 15px !important; color: var(--bf-muted); }

/* Lean post head on small screens: answer and checker come first */
@media (max-width: 720px) {
  .bt-head picture { display: none; }
  .bt-head h1 { font-size: clamp(34px, 9vw, 40px); }
}

/* Small screens: tighter frame so the checker gets the width */
@media (max-width: 720px) {
  .blog-final-post .blog-final-article { padding-top: 28px; }
  .blog-final-article article { padding: 22px 16px; }
  .bt-check { margin-left: -4px; margin-right: -4px; padding: 20px 16px; }
  .bt-check__radios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .bt-check__radios label { justify-content: center; gap: 6px; min-height: 44px; padding: 6px 8px; font-size: 14px; line-height: 1.2; }
  .bt-check__radios input { width: 16px; height: 16px; }
  .bt-check__result { padding: 16px 14px; }
}
.bt-check__radios label { line-height: 1.2; margin: 0; }
.bt-check__radios input[type="radio"] { min-height: 0; padding: 0; border: 0; flex: none; box-shadow: none; }
/* Segmented control: native radio kept for keyboard/screen readers, visually hidden */
.bt-check__radios input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bt-check__radios label { position: relative; justify-content: center; text-align: center; }
.bt-check__radios label:has(input:checked) { background: var(--bf-navy); border-color: var(--bf-navy); color: #fff; }
.blog-final-post-head.bt-head { padding-bottom: 36px; }

/* Service pages (content-card template): numbered steps, hero note, button icon */
.content-card ol.bt-steps { list-style: none; counter-reset: bt-step; padding-left: 0; margin: 12px 0 24px; }
.content-card ol.bt-steps > li { counter-increment: bt-step; position: relative; padding: 0 0 18px 52px; margin: 0; line-height: 1.65; }
.content-card ol.bt-steps > li::before {
  content: counter(bt-step); position: absolute; left: 0; top: 0; width: 34px; height: 34px;
  display: grid; place-items: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: #fff; background: var(--bf-navy, #0d1b2a); border-radius: 50%;
}
.content-card ol.bt-steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 16.5px; top: 38px; bottom: 4px; width: 1px; background: var(--bf-line, #dce2ea);
}
.content-card .bt-cta { margin: 8px 0 0; }
.bt-hero-note { margin: 14px 0 0; max-width: 56ch; font-size: 15px; line-height: 1.55; opacity: .92; }
.btn.bt-hero-wa { display: inline-flex; align-items: center; gap: 10px; }
.btn.bt-hero-wa svg, .hero__actions .btn svg { width: 20px; height: 20px; flex: none; }
.content-card .detail-list li, .content-card .service-checklist li { padding: 10px 14px; }

/* Checkbox / radio option groups (verificador de rescisão indireta) */
.bt-check fieldset.bt-opts { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.bt-check fieldset.bt-opts legend { padding: 0; margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--bf-navy); }
.bt-opts__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.bt-opts__grid label {
  display: flex; align-items: flex-start; gap: 10px;
  min-height: 48px; padding: 12px 14px; margin: 0;
  font-size: 15px; line-height: 1.35; color: var(--bf-text);
  background: #fff; border: 1px solid #b9c3cf; border-radius: 10px; cursor: pointer;
  transition: border-color .15s ease-out, background-color .15s ease-out;
}
.bt-opts__grid input { flex: none; width: 18px; height: 18px; min-height: 0; margin: 1px 0 0; padding: 0; accent-color: var(--bf-navy); }
.bt-opts__grid label:has(input:checked) { border-color: var(--bf-navy); background: #eef2f7; color: var(--bf-navy); }
.bt-opts__grid label:has(input:focus-visible) { outline: 3px solid var(--bf-navy); outline-offset: 2px; }
.bt-opts__sub { margin: 10px 0 0; padding: 14px; border-radius: 10px; background: rgba(255,255,255,.6); border: 1px dashed var(--bf-gold-soft); }
.bt-opts__sub[hidden] { display: none; }
.bt-check form#ri-form { display: block; }
.bt-check form#ri-form button { margin-top: 4px; }
.bt-check__result[data-state="forte"] strong.bt-check__verdict { color: var(--bf-sage); }
.bt-check__result[data-state="fraco"] strong.bt-check__verdict { color: #8a1f1f; }
.ri-lista { margin: 8px 0 12px; padding-left: 1.2em; }
.ri-lista li { margin: 0 0 8px; font-size: 15.5px; line-height: 1.55; }
.ri-alerta { margin: 10px 0 0 !important; padding: 12px 14px; border-radius: 10px; background: var(--bf-warm); border: 1px solid var(--bf-gold-soft); font-size: 15px !important; }
@media (max-width: 640px) { .bt-opts__grid { grid-template-columns: minmax(0, 1fr); } }
/* Tables fit the article column on desktop (an older rule forced 680px) */
@media (min-width: 641px) { .blog-final-article .blog-final-table-wrap table { min-width: 0; } }
/* Submit button of the multi-question checker */
#ri-form button[type="submit"] {
  min-height: 48px; padding: 10px 22px; font: inherit; font-size: 16px; font-weight: 700;
  color: #fff; background: var(--bf-navy); border: 0; border-radius: 10px; cursor: pointer;
  transition: background-color .18s ease-out;
}
#ri-form button[type="submit"]:hover { background: var(--bf-navy-soft); }
#ri-form button[type="submit"]:focus-visible { outline: 3px solid var(--bf-gold); outline-offset: 2px; }
@media (max-width: 640px) { #ri-form button[type="submit"] { width: 100%; } }
/* Inline prompt: text never squeezed by a long button */
.bt-cta { display: flex; flex-wrap: wrap; }
.bt-cta p { flex: 1 1 300px; }
.bt-cta .bt-wa { flex: 0 1 auto; }
#jc-form button[type="submit"] {
  min-height: 48px; padding: 10px 22px; font: inherit; font-size: 16px; font-weight: 700;
  color: #fff; background: var(--bf-navy); border: 0; border-radius: 10px; cursor: pointer;
}
#jc-form button[type="submit"]:hover { background: var(--bf-navy-soft); }
#jc-form button[type="submit"]:focus-visible { outline: 3px solid var(--bf-gold); outline-offset: 2px; }
@media (max-width: 640px) { #jc-form button[type="submit"] { width: 100%; } }
/* Compact legal list (art. 482) */
details.bt-482 { margin: 8px 0 22px; border: 1px solid var(--bf-line); border-radius: 12px; background: #fff; }
details.bt-482 > summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--bf-navy); }
details.bt-482 > ul { margin: 0 0 14px; padding: 0 18px 0 36px; }
details.bt-482 > ul li { font-size: 15.5px !important; margin-bottom: 6px !important; }
