/*
 * Conversion components (post enquiry boxes, announcement bar states).
 * Hand-written and separate from main.css on purpose: main.css is compiled from
 * SCSS that no longer exists, so new styles live here instead of being patched in.
 */

.td-post-cta {
  --td-cta-accent: #21c898;
  --td-cta-ink: #1f2a2e;
  --td-cta-muted: #5b666b;
  border-radius: 14px;
  color: var(--td-cta-ink);
}

.td-post-cta__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #138a68;
  margin: 0 0 0.35rem;
}

.td-post-cta__title {
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--td-cta-ink);
  margin: 0 0 0.5rem;
}

.td-post-cta__sub {
  font-size: 0.95rem;
  color: var(--td-cta-muted);
  margin: 0 0 1rem;
}

.td-post-cta__link {
  font-weight: 700;
  font-size: 0.9rem;
  color: #138a68;
  text-decoration: none;
}
.td-post-cta__link:hover { text-decoration: underline; }

/* Mid-article box */
.td-post-cta--inline {
  margin: 2.5rem 0;
  padding: 1.5rem 1.5rem 1.25rem;
  background: #eefaf6;
  border: 1px solid #bfeadb;
  border-left: 5px solid var(--td-cta-accent);
}
.td-post-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

/* End-of-article form */
.td-post-cta--form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 3rem 0 0;
  padding: 1.75rem;
  background: #f6f8f8;
  border: 1px solid #e1e7e8;
  scroll-margin-top: 140px;
}
@media (min-width: 768px) {
  .td-post-cta--form { grid-template-columns: 1.1fr 1fr; padding: 2rem; }
}
.td-post-cta--form .td-post-cta__title { font-size: 1.4rem; }
.td-post-cta__points {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.td-post-cta__points li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.td-post-cta__points li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  color: var(--td-cta-accent);
}
.td-post-cta__form {
  background: #fff;
  border: 1px solid #e1e7e8;
  border-radius: 12px;
  padding: 1.25rem;
}
.td-post-cta__privacy {
  font-size: 0.75rem;
  color: var(--td-cta-muted);
  text-align: center;
  margin: 0.6rem 0 0;
}

/* Announcement bar: calm by default, urgent only in the final 90 days */
#mtd-announcement.td-announce--calm { background: linear-gradient(90deg, #1f2a2e 0%, #2f4a45 100%) !important; }
#mtd-announcement.td-announce--urgent { background: linear-gradient(90deg, #7b0d1e 0%, #c0392b 100%) !important; }

/* Calculators (inc/core/calculators.php) */
.td-calc {
  margin: 2.5rem 0;
  padding: 1.5rem;
  border: 1px solid #bfeadb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(31, 42, 46, 0.06);
}
.td-calc [hidden] { display: none !important; }
.td-calc__title { font-size: 1.25rem; font-weight: 800; color: #1f2a2e; margin: 0 0 1rem; }
.td-calc__grid { display: grid; grid-template-columns: 1fr; gap: 0.9rem 1.25rem; }
@media (min-width: 640px) { .td-calc__grid { grid-template-columns: 1fr 1fr; } }
.td-calc__grid label, .td-calc__method legend { display: block; font-size: 0.85rem; font-weight: 600; color: #3a464b; }
.td-calc__grid input[type=number] {
  display: block; width: 100%; margin-top: 0.3rem; padding: 0.55rem 0.75rem;
  font-size: 1rem; border: 1px solid #cfd8da; border-radius: 8px; background: #f9fbfb;
}
.td-calc__money { position: relative; display: block; }
.td-calc__money::before { content: "£"; position: absolute; left: 0.75rem; top: calc(50% + 0.15rem); transform: translateY(-50%); color: #5b666b; }
.td-calc__money input[type=number] { padding-left: 1.6rem; }
.td-calc__method { border: 0; padding: 0; margin: 0; }
.td-calc__method label { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0.4rem 1rem 0 0; font-weight: 500; }
.td-calc__out {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 1.25rem 0 0.75rem;
  padding: 1rem; border-radius: 10px; background: #eefaf6;
}
@media (min-width: 640px) { .td-calc__out { grid-template-columns: repeat(4, 1fr); } }
.td-calc__out span { display: block; font-size: 0.75rem; color: #5b666b; }
.td-calc__out strong { font-size: 1.15rem; color: #1f2a2e; }
.td-calc__total strong { color: #138a68; font-size: 1.35rem; }
.td-calc__note { grid-column: 1 / -1; margin: 0; font-size: 0.85rem; color: #3a464b; }
.td-calc__small { font-size: 0.75rem; color: #5b666b; margin: 0 0 1rem; }

/* ---------------------------------------------------------------------------
 * Mobile chrome (2026-11-24). The sticky header (announcement + nav) took
 * 161px and the bottom CTA bar 71px: 30% of a phone screen, permanently.
 * The announcement now scrolls away (header gets a negative sticky `top`
 * from main.js), the nav is slimmer below lg, and the reCAPTCHA badge no
 * longer sits on top of the "Check MTD" button.
 * ------------------------------------------------------------------------ */
@media (max-width: 991.98px) {
  #masthead .navbar { padding-top: .5rem !important; padding-bottom: .5rem !important; }
  #masthead .custom-logo { max-height: 40px; width: auto; }
  .grecaptcha-badge { bottom: 86px !important; }
  /* The hero's second paragraph repeats the first; on phones it pushed the
     callback form a full screen further down. */
  .hero-section .hero-secondary-copy { display: none; }
  /* Room for the fixed Call / Check MTD bar, which otherwise covers the
     last lines of the footer (company number, VAT number). */
  body { padding-bottom: 76px; }
}

/* Related questions on FAQ pages: the theme's list styling added bullets
   inside the list-group. */
nav[aria-labelledby="related-faqs-title"] .list-group { list-style: none; padding-left: 0; }
nav[aria-labelledby="related-faqs-title"] .list-group-item::before,
nav[aria-labelledby="related-faqs-title"] .list-group-item::marker { content: none; }
