/* ============================================================================
   tne-formulario.css — Página /pages/formulario-revendedora
   DistribuidorTopBioEuropa | Site institucional B2B

   Layout split-screen: hero verde sticky à esquerda (5fr), formulário
   bege claro à direita (7fr). Mobile: empilhado.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. Layout grid base
   ---------------------------------------------------------------------------- */
.tne-form-page {
  background: var(--tne-cream-light);
  min-height: 100vh;
}

.tne-form-page__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  min-height: 100vh;
  align-items: stretch;
}

@media (max-width: 900px) {
  /* Mobile empilhado: remover a altura mínima de ecrã inteiro (existia para
     o split-screen desktop). Em mobile, com align-content: stretch, podia
     deixar vazios entre o painel verde e o formulário em ecrãs altos. */
  .tne-form-page,
  .tne-form-page__grid {
    min-height: 0;
  }
  .tne-form-page__grid {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------------------------
   2. Coluna esquerda — Hero institucional (verde)
   ---------------------------------------------------------------------------- */
.tne-form-page__hero {
  position: sticky;
  top: var(--tne-header-h, 76px);
  align-self: start;
  height: calc(100vh - var(--tne-header-h, 76px));
  background: var(--tne-green);
  color: var(--tne-white);
  padding: clamp(28px, 4vh, 48px) clamp(28px, 3vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5vh, 28px);
  overflow: hidden;
}

@media (max-width: 900px) {
  .tne-form-page__hero {
    position: static;
    height: auto;
    padding: 40px 24px;
    gap: 24px;
  }
}

.tne-form-page__back {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 200ms cubic-bezier(0.4, 0, 0.2, 1);
  align-self: flex-start;
}

.tne-form-page__back:hover,
.tne-form-page__back:focus-visible {
  color: var(--tne-white);
  text-decoration: none;
}

.tne-form-page__hero-content {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.8vh, 20px);
  min-height: 0;
}

.tne-form-page__eyebrow {
  color: var(--tne-gold-light);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.tne-form-page__hero-title {
  font-family: var(--tne-font-primary);
  font-size: clamp(28px, 2.8vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
  color: var(--tne-white);
  letter-spacing: -0.01em;
}

.tne-form-page__hero-title em {
  color: var(--tne-gold-light);
  font-style: italic;
  font-family: var(--tne-font-accent);
  font-weight: 400;
}

.tne-form-page__hero-subtitle {
  font-size: clamp(13px, 1.5vh, 15px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  max-width: 44ch;
}

/* ----------------------------------------------------------------------------
   3. Steps (lista numerada)
   ---------------------------------------------------------------------------- */
.tne-form-page__steps {
  list-style: none;
  margin: clamp(8px, 1.5vh, 16px) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vh, 18px);
}

.tne-form-page__steps > li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.tne-step__number {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tne-gold);
  color: var(--tne-white);
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}

.tne-form-page__steps strong {
  display: block;
  color: var(--tne-white);
  font-weight: 700;
  font-size: clamp(13px, 1.5vh, 15px);
  margin-bottom: 2px;
  line-height: 1.3;
}

.tne-form-page__steps p {
  margin: 0;
  font-size: clamp(12px, 1.35vh, 13px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.68);
}

.tne-form-page__decoration {
  display: none;
}

/* ----------------------------------------------------------------------------
   4. Coluna direita — Formulário
   ---------------------------------------------------------------------------- */
.tne-form-page__form-wrap {
  background: var(--tne-cream-light);
  padding: 48px 64px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .tne-form-page__form-wrap {
    padding: 32px 24px;
  }
}

.tne-form-page__form-header {
  margin-bottom: 24px;
  position: relative;
  padding-top: 16px;
}

.tne-form-page__form-header::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--tne-gold);
  margin-bottom: 16px;
}

.tne-form-page__form-header h2 {
  color: var(--tne-text);
  font-family: var(--tne-font-primary);
  font-weight: 700;
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.25;
  margin: 0 0 12px;
  letter-spacing: -0.005em;
}

.tne-form-page__form-header p {
  color: var(--tne-text-muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

/* ----------------------------------------------------------------------------
   5. Privacy banner
   ---------------------------------------------------------------------------- */
.tne-form-page__privacy {
  background: var(--tne-cream);
  border-left: 3px solid var(--tne-gold);
  padding: 12px 16px;
  border-radius: var(--tne-radius-md);
  font-size: 13px;
  color: var(--tne-text-muted);
  margin-bottom: 32px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.tne-form-page__lock {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--tne-gold);
}

/* ----------------------------------------------------------------------------
   6. Form errors (Shopify default_errors)
   ---------------------------------------------------------------------------- */
.tne-form__errors {
  background: #fff5f5;
  border-left: 3px solid #c0362c;
  padding: 12px 16px;
  border-radius: var(--tne-radius-md);
  margin-bottom: 24px;
  color: #8a1f17;
  font-size: 14px;
}

.tne-form__errors ul {
  margin: 0;
  padding-left: 18px;
}

/* ----------------------------------------------------------------------------
   7. Fieldsets (5 secções)
   ---------------------------------------------------------------------------- */
.tne-form__section {
  border: none;
  margin: 0 0 40px;
  padding: 0;
}

.tne-form__section legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--tne-font-primary);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--tne-gold);
  border-bottom: 2px solid var(--tne-cream);
  padding-bottom: 12px;
  margin-bottom: 24px;
  width: 100%;
}

.tne-form__section-num {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tne-green);
  color: var(--tne-white);
  font-weight: 800;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}

/* ----------------------------------------------------------------------------
   8. Fields (label + input/textarea)
   ---------------------------------------------------------------------------- */
.tne-form__field {
  margin-bottom: 24px;
}

.tne-form__field > label {
  display: block;
  font-family: var(--tne-font-primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tne-text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.tne-form__field small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--tne-gold);
  margin-top: 2px;
  text-transform: none;
}

.tne-required {
  color: var(--tne-gold);
  margin-left: 2px;
  font-weight: 700;
}

.tne-form__field input[type="text"],
.tne-form__field input[type="email"],
.tne-form__field input[type="tel"],
.tne-form__field textarea {
  width: 100%;
  padding: 14px;
  background: var(--tne-white);
  border: 1px solid var(--tne-cream);
  border-radius: var(--tne-radius-md);
  font-family: inherit;
  font-size: 15px;
  color: var(--tne-text);
  line-height: 1.5;
  transition: border-color 200ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-sizing: border-box;
}

.tne-form__field textarea {
  resize: vertical;
  min-height: 90px;
}

.tne-form__field input:focus,
.tne-form__field textarea:focus {
  border-color: var(--tne-green);
  box-shadow: 0 0 0 3px rgba(0, 74, 60, 0.1);
}

.tne-form__field input.is-invalid,
.tne-form__field textarea.is-invalid {
  border-color: #c0362c;
  box-shadow: 0 0 0 3px rgba(192, 54, 44, 0.1);
}

.tne-form__field-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #c0362c;
  font-weight: 600;
}

/* ----------------------------------------------------------------------------
   9. Radio group (pill style)
   ---------------------------------------------------------------------------- */
.tne-form__radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tne-form__radio {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--tne-cream);
  border-radius: var(--tne-radius-pill);
  background: var(--tne-white);
  cursor: pointer;
  font-size: 14px;
  color: var(--tne-text);
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.tne-form__radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tne-form__radio:hover {
  border-color: var(--tne-gold);
}

.tne-form__radio:has(input[type="radio"]:checked) {
  background: var(--tne-green);
  color: var(--tne-white);
  border-color: var(--tne-green);
}

.tne-form__radio:has(input[type="radio"]:focus-visible) {
  box-shadow: 0 0 0 3px rgba(0, 74, 60, 0.18);
}

/* ----------------------------------------------------------------------------
   10. Checkboxes RGPD
   ---------------------------------------------------------------------------- */
.tne-form__section--consents {
  margin-top: 16px;
  margin-bottom: 24px;
}

.tne-form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--tne-text-muted);
}

.tne-form__checkbox input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--tne-green);
  cursor: pointer;
}

.tne-form__checkbox label {
  cursor: pointer;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--tne-text-muted);
  font-size: 13px;
}

/* ----------------------------------------------------------------------------
   11. Submit button + footer note
   ---------------------------------------------------------------------------- */
.tne-form__submit {
  display: block;
  width: 100%;
  padding: 18px;
  background: var(--tne-green);
  color: var(--tne-white);
  border: none;
  border-radius: var(--tne-radius-pill);
  font-family: var(--tne-font-primary);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  margin-top: 32px;
  transition: background 200ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.tne-form__submit:hover {
  background: var(--tne-green-hover);
  transform: translateY(-1px);
  box-shadow: var(--tne-shadow-md);
}

.tne-form__submit:active {
  transform: translateY(0);
}

.tne-form__submit:disabled,
.tne-form__submit[data-loading="true"] {
  cursor: wait;
  opacity: 0.85;
  transform: none;
}

.tne-form__submit-loading {
  display: none;
}

.tne-form__submit[data-loading="true"] .tne-form__submit-label {
  display: none;
}

.tne-form__submit[data-loading="true"] .tne-form__submit-loading {
  display: inline;
}

.tne-form__footer-note {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--tne-text-subtle);
  letter-spacing: 0.02em;
}

/* ----------------------------------------------------------------------------
   12. Success message
   ---------------------------------------------------------------------------- */
.tne-form__success {
  background: var(--tne-cream);
  border-left: 4px solid var(--tne-green);
  padding: 32px;
  border-radius: var(--tne-radius-lg);
  text-align: center;
}

.tne-form__success h2 {
  color: var(--tne-green);
  font-family: var(--tne-font-primary);
  font-weight: 800;
  font-size: clamp(22px, 2.5vw, 30px);
  margin: 0 0 12px;
  letter-spacing: -0.005em;
}

.tne-form__success p {
  color: var(--tne-text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 24px;
}

.tne-form__success .tne-btn-primary {
  display: inline-block;
}

/* ----------------------------------------------------------------------------
   13. Reduced motion
   ---------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .tne-form-page__back,
  .tne-form__field input,
  .tne-form__field textarea,
  .tne-form__radio,
  .tne-form__submit {
    transition: none;
  }
}

/* ----------------------------------------------------------------------------
   Honeypot anti-spam (item #4 auditoria 2026-05-20)
   Não usar display:none — alguns bots ignoram. Posicionar fora do viewport
   com width:1px para que o input continue presente no DOM.
   ---------------------------------------------------------------------------- */
.tne-form__honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

