/**
 * Trial gratis 7 dias — modal + botao (spec 2026-07-23).
 *
 * Auto-contido (prefixo tr- / trial-): funciona tanto na home (home.css)
 * quanto nas paginas de segmento (styles.css) sem depender de tokens de
 * nenhum dos dois. Mobile-first: em telas pequenas o dialog vira sheet
 * de tela cheia rolavel.
 */

/* ============ Botao CTA (usavel fora do modal) ============ */
.btn--trial {
  background: #0B57D0;
  color: #fff !important;
  border: none;
  cursor: pointer;
  font-weight: 700;
}
.btn--trial:hover { background: #0947ab; color: #fff; }
.site-header__actions { display: flex; gap: 10px; align-items: center; }

/* ============ Secao de preco (home) ============ */
.trial-pricing { padding: 88px 0; background: #f6f8fc; }

.trial-pricing__head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.trial-pricing__lead { margin-top: 14px; color: #475569; font-size: 1.05rem; line-height: 1.6; }

.trial-pricing__card {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 60px -28px rgba(13, 27, 42, 0.28);
}

/* Zona 1 — a oferta (topo levemente tingido de azul) */
.trial-pricing__top {
  padding: 34px 40px 30px;
  text-align: center;
  background: linear-gradient(180deg, #eef4ff 0%, #ffffff 100%);
  border-bottom: 1px solid #eef1f6;
}
.trial-pricing__badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: #0B57D0; background: #e4edff; border: 1px solid #cfe0ff;
  padding: 6px 13px; border-radius: 999px;
}
.trial-pricing__badge::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: #0B57D0; box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.18);
}
.trial-pricing__plan {
  margin-top: 18px;
  font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #64748b;
}
.trial-pricing__price {
  font-family: var(--font-display, 'Bricolage Grotesque', system-ui, sans-serif);
  font-weight: 800; color: #0d1b2a; line-height: 1;
  margin: 8px 0 12px;
  display: inline-flex; align-items: flex-start; justify-content: center; gap: 5px;
  font-size: clamp(54px, 8vw, 72px);
}
.trial-pricing__cur { font-size: 0.4em; font-weight: 700; color: #475569; margin-top: 0.45em; }
.trial-pricing__per { font-size: 0.26em; font-weight: 600; color: #94a3b8; align-self: flex-end; margin-bottom: 0.85em; }
.trial-pricing__after { color: #64748b; font-size: 14px; line-height: 1.55; max-width: 36ch; margin: 0 auto; }

/* Zona 2 — o que vem incluido */
.trial-pricing__body { padding: 28px 40px 34px; }
.trial-pricing__list { list-style: none; padding: 0; margin: 0 0 26px; }
.trial-pricing__list li {
  position: relative; padding: 11px 0 11px 34px;
  color: #334155; font-size: 15px; line-height: 1.45;
  border-bottom: 1px solid #f1f4f8;
}
.trial-pricing__list li:last-child { border-bottom: none; }
.trial-pricing__list li::before {
  content: ''; position: absolute; left: 0; top: 10px;
  width: 21px; height: 21px; border-radius: 50%;
  background: #12a150 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / 12px;
}
.trial-pricing__cta { width: 100%; }
.trial-pricing__micro {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13px; color: #94a3b8; margin-top: 16px; text-align: center;
}
.trial-pricing__micro svg { flex-shrink: 0; }

@media (max-width: 600px) {
  .trial-pricing { padding: 56px 0; }
  .trial-pricing__head { margin-bottom: 32px; }
  .trial-pricing__card { margin: 0 16px; border-radius: 18px; }
  .trial-pricing__top { padding: 28px 22px 24px; }
  .trial-pricing__body { padding: 22px 22px 26px; }
  .trial-pricing__price { font-size: clamp(46px, 13vw, 58px); }
}

/* ============ Overlay ============ */
.trial-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(10, 15, 30, 0.62);
  padding: 24px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.trial-modal.is-open { display: flex; align-items: flex-start; justify-content: center; }

.trial-modal__dialog {
  position: relative;
  background: #fff;
  color: #111827;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  margin: auto 0;
  padding: 32px 28px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  font-family: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.trial-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  padding: 6px;
}
.trial-modal__close:hover { color: #111827; }

/* ============ Tipografia ============ */
.tr-title { font-size: 22px; font-weight: 800; margin: 0 0 6px; color: #0f172a; }
.tr-subtitle { font-size: 14px; color: #4b5563; margin: 0 0 20px; line-height: 1.5; }
.tr-micro { font-size: 12px; color: #6b7280; text-align: center; margin: 12px 0 0; }

/* ============ Campos ============ */
.tr-field { margin-bottom: 14px; }
.tr-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tr-label { display: block; font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.tr-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 15px;
  font-family: inherit;
  color: #111827;
  background: #fff;
}
.tr-input:focus { outline: 2px solid #0B57D0; outline-offset: -1px; border-color: #0B57D0; }

.tr-slug-group {
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.tr-slug-group input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 11px 12px;
  font-size: 15px;
  font-family: inherit;
  color: #111827;
  outline: none;
}
.tr-slug-group span {
  padding: 11px 12px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 14px;
  border-left: 1px solid #e5e7eb;
  white-space: nowrap;
}
.tr-slug-status { font-size: 12px; margin-top: 4px; min-height: 16px; color: #6b7280; }
.tr-slug-status.is-ok { color: #0f9f6e; }
.tr-slug-status.is-bad { color: #dc2626; }

/* Honeypot: fora da viewport, invisivel pra humano e leitor de tela */
.tr-hp { position: absolute; left: -9999px; top: -9999px; height: 1px; width: 1px; overflow: hidden; }

.tr-optin {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12.5px;
  color: #4b5563;
  margin: 4px 0 14px;
  cursor: pointer;
  line-height: 1.45;
}
.tr-optin input { margin-top: 2px; flex-shrink: 0; }

.tr-errors {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.tr-errors.is-visible { display: block; }
.tr-errors a { color: #b91c1c; font-weight: 600; }

.tr-btn {
  width: 100%;
  box-sizing: border-box;
  background: #0B57D0;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
}
.tr-btn:hover { background: #0947ab; }
.tr-btn:disabled { opacity: 0.6; cursor: wait; }
/* Estado "código confirmado" (etapa 1 concluída antes de montar o ERP). */
.tr-btn.is-ok, .tr-btn.is-ok:disabled { background: #12a150; color: #fff; opacity: 1; cursor: default; }

.tr-link-btn {
  background: none;
  border: none;
  color: #0B57D0;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 8px;
  text-decoration: underline;
}
.tr-link-btn:disabled { color: #9ca3af; cursor: default; text-decoration: none; }
.tr-code-actions { display: flex; justify-content: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ============ Passo codigo ============ */
.tr-code-input {
  display: block;
  width: 100%;
  max-width: 260px;
  margin: 0 auto 16px;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 14px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 10px;
  text-align: center;
  color: #0f172a;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}
.tr-code-input:focus { outline: 2px solid #0B57D0; outline-offset: -1px; }

/* ============ Passo provisioning/sucesso ============ */
.tr-step--center { text-align: center; padding-top: 12px; }
.tr-spinner {
  width: 44px;
  height: 44px;
  margin: 8px auto 18px;
  border: 4px solid #e5e7eb;
  border-top-color: #0B57D0;
  border-radius: 50%;
  animation: tr-spin 0.9s linear infinite;
}
@keyframes tr-spin { to { transform: rotate(360deg); } }
.tr-success-icon {
  width: 56px;
  height: 56px;
  margin: 4px auto 16px;
  border-radius: 50%;
  background: #0f9f6e;
  display: flex;
  align-items: center;
  justify-content: center;
}
#tr-access-link { max-width: 260px; margin: 8px auto 0; }

/* ============ Mobile ============ */
@media (max-width: 560px) {
  .trial-modal { padding: 0; }
  .trial-modal__dialog {
    max-width: none;
    min-height: 100%;
    margin: 0;
    border-radius: 0;
    padding: 28px 20px 32px;
  }
  .tr-grid-2 { grid-template-columns: 1fr; gap: 0; }
  .tr-title { font-size: 20px; }
  .tr-input, .tr-slug-group input { font-size: 16px; } /* evita zoom do iOS */
}
