/* Schwendler Advocacia: ligação entre o CSS do layout (estilo.css) e as caixas que o Elementor gera. Autor: Thiago Benine.
   Cada página é feita de Contêineres do Elementor com as classes do layout aprovado (hero, secao, wrap, grade...);
   dentro deles, widgets de Texto (títulos e parágrafos, para editar no modo visual), Imagem, HTML e Shortcode (formulário).
   O estilo.css carrega depois do CSS do Elementor, então as classes do layout ganham das regras gerais do Elementor. */

/* 1. As caixas que o Elementor põe em volta de cada widget não entram no layout: o título, o texto ou a lista de dentro
      ficam como filhos diretos do contêiner, como no layout. No editor do Elementor elas continuam com caixa, para dar para clicar. */
body.schwendler:not(.elementor-editor-active) .elementor .elementor-widget,
body.schwendler:not(.elementor-editor-active) .elementor .elementor-widget-container,
body.schwendler:not(.elementor-editor-active) .elementor .elementor-shortcode { display: contents; }

/* 2. Contêineres neutros: as variáveis do Elementor ficam no valor que não muda nada, e quem decide é a classe do layout.
      O !important vai só nas variáveis, porque o Elementor grava as dele em cada elemento. */
body.schwendler .elementor .e-con {
  --display: block !important;
  --width: auto !important; --height: auto !important; --min-height: 0px !important;
  --padding-top: 0px !important; --padding-right: 0px !important; --padding-bottom: 0px !important; --padding-left: 0px !important;
  --margin-top: 0px !important; --margin-right: 0px !important; --margin-bottom: 0px !important; --margin-left: 0px !important;
  --row-gap: 0px !important; --column-gap: 0px !important;
  --flex-direction: row !important; --flex-wrap: nowrap !important; --flex-grow: 0 !important; --flex-shrink: 1 !important; --flex-basis: auto !important;
  --align-items: normal !important; --align-content: normal !important; --justify-content: normal !important;
  --text-align: inherit !important; --overflow: visible !important; --z-index: auto !important;
}
body.schwendler:not(.elementor-editor-active) .elementor .e-con { --position: static !important; }
/* O layout usa uma variável --gap (espaço entre colunas) com o mesmo nome de uma do Elementor: dentro das caixas, vale a do layout. */
body.schwendler .elementor .e-con,
body.schwendler .elementor .elementor-widget { --gap: inherit !important; }

/* 3. Elementor não muda as cores, as fontes nem os links dos textos: valem os do layout. */
body.schwendler .elementor .elementor-widget-text-editor,
body.schwendler .elementor .elementor-widget-html,
body.schwendler .elementor .elementor-widget-shortcode { color: inherit; font: inherit; }
body.schwendler .elementor .elementor-widget-image img { display: block; }
body.schwendler .elementor a.link { text-decoration-line: underline; text-decoration-thickness: 1px; }
body.schwendler .elementor a.btn-contorno { box-shadow: inset 0 0 0 1.5px var(--preto); }
body.schwendler .elementor .elementor-widget-text-editor :is(p, li) > a:not([class]) { text-decoration-line: underline; text-underline-offset: 3px; }

/* 4. Regras do layout escritas para "filho direto" (>), refeitas para o texto que fica dentro do widget de Texto. */
body.schwendler .leitura > .elementor-widget > .t-lead,
body.schwendler .leitura > .elementor-widget > .elementor-widget-container > .t-lead { max-width: 34em; }
/* No layout, a foto do topo era uma <figure>, que tem 40 px de margem à esquerda; o contêiner do Elementor não é figure, então a margem vem daqui. */
@media (min-width: 1024px) { body.schwendler .hero-foto { margin-left: 40px; } }
body.schwendler .aside > .elementor-widget > p,
body.schwendler .aside > .elementor-widget > .elementor-widget-container > p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--grafite); }

/* 5. Formulário de contato (Fluent Forms, sem o CSS do plugin): o mesmo desenho dos campos do layout.
      O plugin escreve cada campo como "ff-el-group" com as classes campo / campo largo, que o estilo.css já desenha. */
body.schwendler .form .fluentform { margin-top: 32px; }
body.schwendler .form .frm-fluent-form fieldset { --linha-campos: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: var(--linha-campos) 16px; min-width: 0; }
body.schwendler .form .ff-el-group.largo { grid-column: 1 / -1; }
body.schwendler .form .ff-el-input--label label { display: block; }
body.schwendler .form .ff-el-input--content { display: flex; flex-direction: column; }
body.schwendler .form .aceite-ff { margin-top: calc(24px - var(--linha-campos)); }
body.schwendler .form .ff_tc_label { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; font-size: 14px; line-height: 1.55; color: var(--grafite); cursor: pointer; }
body.schwendler .form .ff_tc_checkbox { display: block; line-height: 0; }
body.schwendler .form .ff_tc_checkbox input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--verde); }
body.schwendler .form .ff_t_c a { color: var(--verde); text-decoration-line: underline; text-underline-offset: 3px; }
body.schwendler .form .ff-custom_html .antes-enviar { margin-top: calc(24px - var(--linha-campos)); }
/* avisos legais do formulário em inglês, em letra pequena logo acima do botão (Lucas, 25/10) */
body.schwendler .form .ff-custom_html .aviso-legal { margin-top: calc(12px - var(--linha-campos)); max-width: 40em; font-size: 13px; line-height: 1.5; color: var(--grafite); }
body.schwendler .form .envio .btn { margin-top: calc(28px - var(--linha-campos)); }
body.schwendler .form .ff-btn-submit[disabled] { opacity: 0.72; cursor: progress; }
/* erro: borda e aviso na cor de erro do layout, logo abaixo do campo */
body.schwendler .form .ff-el-is-error .ff-el-form-control,
body.schwendler .form .ff-el-is-error .ff-el-form-control:hover { border-color: var(--erro); }
body.schwendler .form .ff-el-is-error .ff-el-form-control:focus { border-color: var(--erro); box-shadow: 0 0 0 1px var(--erro); }
body.schwendler .form .ff-el-group .error,
body.schwendler .form .ff-errors-in-stack .error { margin-top: 8px; font: 600 14px/1.4 var(--sans); color: var(--erro); }
body.schwendler .form .aceite-ff .error { margin-left: 32px; }
body.schwendler .form .ff-errors-in-stack:not(:empty) { margin-top: 16px; }

@media (max-width: 1023px) {
  body.schwendler .grade > .elementor-widget > *,
  body.schwendler .grade > .elementor-widget > .elementor-widget-container > * { grid-column: 1 / -1 !important; }
  body.schwendler .form .fluentform { margin-top: 24px; }
  body.schwendler .form .frm-fluent-form fieldset { --linha-campos: 18px; grid-template-columns: 1fr; }
}

/* 6. Páginas que não tinham desenho próprio no layout, montadas só com peças dele:
      Mensagem enviada (fundo Papel, colunas 1 a 7), Política de privacidade (fundo Branco, colunas 1 a 8) e a página inicial provisória em inglês. */
body.schwendler .curta-texto { grid-column: 1 / span 7; }
body.schwendler .curta-texto .t-rotulo { color: var(--verde); }
body.schwendler .curta-texto h1 { margin-top: 20px; max-width: 13em; }
body.schwendler .curta-texto .t-lead { margin-top: 24px; max-width: 32em; }
body.schwendler .curta-texto .t-lead + p { margin-top: 16px; max-width: 34em; color: var(--grafite); }
body.schwendler .curta-texto .acoes { margin-top: 36px; }
body.schwendler .curta-texto .canais { max-width: 34em; margin-top: 64px; }
body.schwendler .texto-legal { grid-column: 1 / span 8; }
body.schwendler .texto-legal h1 { max-width: 13em; }
body.schwendler .texto-legal .t-lead { max-width: 34em; margin-top: 24px; }
body.schwendler .texto-legal h2 { margin: 56px 0 16px; font-size: 26px; line-height: 1.25; }
body.schwendler .texto-legal p:not(.t-lead) { max-width: 40em; }
body.schwendler .texto-legal p + p { margin-top: 16px; }
body.schwendler .texto-legal a:not([class]) { color: var(--verde); text-decoration-line: underline; text-underline-offset: 3px; }
body.schwendler .texto-legal .nota { margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--fio); font-size: 15px; color: var(--grafite); }
body.schwendler .hero-nota { max-width: 34em; margin-top: 32px; font-size: 15px; line-height: 1.6; color: var(--cinza-claro); }

/* Páginas de área curtas (Contratos, Penal, Canadá, Imigração): a lista "Principais demandas" termina no botão de contato. */
body.schwendler .leitura .acoes-fim { margin-top: 40px; }

/* Marcador de revisão: trecho que depende de um dado ou de um texto do escritório. Some quando o texto final entra no lugar. */
body.schwendler .pendente { display: inline-block; padding: 1px 7px; border-radius: 3px; background: #F6E7A8; color: #4D3F00; font: 600 14px/1.5 var(--sans); letter-spacing: 0; text-transform: none; vertical-align: middle; white-space: nowrap; }

@media (max-width: 1023px) {
  body.schwendler .curta-texto .acoes .btn { width: 100%; }
  body.schwendler .curta-texto .canais { margin-top: 40px; }
  body.schwendler .texto-legal h2 { margin: 40px 0 12px; font-size: 22px; }
  body.schwendler .texto-legal .nota { margin-top: 40px; }
  body.schwendler .pendente { white-space: normal; }
  body.schwendler .leitura .acoes-fim { margin-top: 32px; }
  body.schwendler .leitura .acoes-fim .btn { width: 100%; }
}
