/* Modal "Veja mais" das Ferramentas (site-v3). Usa os tokens de cor da página (:root). */
.tm-lock, .tm-lock body { overflow: hidden; }

.tool-modal[hidden] { display: none; }
.tool-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
}
.tm-backdrop { position: absolute; inset: 0; background: rgba(14, 20, 32, .62); backdrop-filter: blur(4px); }

.tm-dialog {
  position: relative;
  width: min(1080px, 100%);
  max-height: calc(100vh - 64px);
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(14, 20, 32, .35);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.tm-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--mercury-light); background: rgba(255, 255, 255, .9);
  color: var(--neutral-darkest); font-size: 22px; line-height: 1; cursor: pointer;
}
.tm-close:hover { background: var(--mercury-lighter); }

/* desktop: explicação e formulário lado a lado, 50% / 50%; cada lado rola sozinho */
.tm-scroll { display: grid; grid-template-columns: 1fr 1fr; min-height: 0; flex: 1; }
.tm-body, .tm-form { overflow-y: auto; padding: 44px 40px; }
.tm-body {
  background:
    radial-gradient(circle at left top, rgba(190, 46, 222, .10), transparent 40%),
    var(--mercury-lighter);
}
.tm-form { background: var(--white); }

.tm-tag { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-tag); margin: 0 0 12px; }
.tm-body h2 {
  font-family: "Circular Air Book", "Circular Air", system-ui, sans-serif; font-weight: 500;
  font-size: 30px; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 18px; padding-right: 32px;
}
.tm-intro p { font-size: 16px; margin: 0 0 12px; }
.tm-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0; padding: 18px 0; border-top: 1px solid var(--mercury-light); border-bottom: 1px solid var(--mercury-light); }
.tm-meta h4, .tm-section-title { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--neutral); margin: 0 0 6px; font-weight: 400; }
.tm-meta p { font-size: 14px; margin: 0; }
.tm-steps { display: grid; gap: 10px; margin: 8px 0 22px; padding: 0; list-style: none; counter-reset: tm; }
.tm-steps li { position: relative; padding-left: 34px; font-size: 15px; line-height: 1.45; counter-increment: tm; }
.tm-steps li::before {
  content: counter(tm); position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(190, 46, 222, .12); color: #be2ede; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.tm-control { display: flex; gap: 12px; padding: 16px 18px; border-radius: 14px; background: var(--white); border: 1px solid rgba(190, 46, 222, .2); }
.tm-control::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: #be2ede; }
.tm-control p { font-size: 14px; margin: 0; }

.tm-form h3 { font-size: 20px; margin: 0 0 6px; }
.tm-form .tm-form-sub { font-size: 14px; color: var(--neutral-dark); margin: 0 0 22px; }
.tm-form .field { margin-bottom: 16px; }
.tm-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--neutral-darker); }
.tm-form input { width: 100%; padding: 11px 14px; border: 1px solid var(--mercury); border-radius: 8px; font-family: var(--font-body); font-size: 14px; }
.tm-form input:focus { outline: 2px solid var(--blue-ribbon); outline-offset: 1px; }
.tm-form .btn { width: 100%; justify-content: center; margin-top: 8px; }
.tm-form .btn:disabled { opacity: .6; cursor: wait; transform: none; }
.tm-form .field-feedback { margin: 0; font-size: 13px; color: #b42318; }
.tm-form .field-feedback:empty { display: none; }

/* mobile: tela cheia, explicação primeiro e formulário abaixo, tudo num só scroll */
@media (max-width: 767px) {
  .tool-modal { padding: 0; align-items: stretch; }
  .tm-dialog { width: 100%; max-height: none; height: 100%; border-radius: 0; }
  .tm-scroll { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .tm-body, .tm-form { overflow: visible; padding: 28px 20px; }
  .tm-body { padding-top: 64px; }
  .tm-body h2 { font-size: 26px; }
  .tm-meta { grid-template-columns: 1fr; }
  .tm-form { padding-bottom: 40px; }
  .tm-close { position: fixed; top: 12px; right: 12px; }
}

.tm-detail { margin-top: 18px; }
.tm-detail[hidden] { display: none; }

/* modal de lead (lead-modal.js): uma coluna */
.tm-dialog.is-narrow { width: min(560px, 100%); }
.tm-dialog.is-narrow .tm-scroll { grid-template-columns: 1fr; }
.tm-form textarea { width: 100%; min-height: 110px; padding: 11px 14px; border: 1px solid var(--mercury); border-radius: 8px; font-family: var(--font-body); font-size: 14px; resize: vertical; }
.tm-form textarea:focus { outline: 2px solid var(--blue-ribbon); outline-offset: 1px; }
.tm-form .field-hint { font-size: 12px; color: var(--neutral); margin: 6px 0 0; }
[data-lead-extra][hidden] { display: none; }
