/* ============================================================
   CRM ENEP — Formulário Frontend
   CSS espelhado exatamente no formulário Elementor da ENEP
   ============================================================ */

/* ── Reset dentro do wrapper ───────────────────────────────── */
.crm-enep-form-wrapper,
.crm-enep-form-wrapper * {
  box-sizing: border-box;
}

.crm-enep-form-wrapper {
  width: 100%;
}

/* ── Campos ────────────────────────────────────────────────── */
.crm-enep-field {
  margin-bottom: 12px;
}

/* Label — forçado branco com máxima especificidade */
.crm-enep-form-wrapper .crm-enep-field label,
.crm-enep-form-wrapper .crm-enep-field > label,
div.crm-enep-form-wrapper label,
div.crm-enep-form-wrapper .crm-enep-field label {
  display: block !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  margin-bottom: 5px !important;
  padding: 0 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  font-family: inherit !important;
}

/* Input — pill branco igual ao do print */
.crm-enep-field input {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  padding: 12px 20px !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 30px !important;
  background: #ffffff !important;
  color: #333333 !important;
  font-size: 14px !important;
  font-family: inherit !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  outline: none !important;
  box-shadow: none !important;
  transition: box-shadow .15s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.crm-enep-field input::placeholder {
  color: #aaaaaa !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

.crm-enep-field input:focus {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5) !important;
}

.crm-enep-field input.crm-enep-input-error {
  box-shadow: 0 0 0 2px rgba(220, 50, 50, 0.6) !important;
}

/* ── Mensagem de erro ──────────────────────────────────────── */
.crm-enep-form-error {
  background: rgba(220, 50, 50, 0.15);
  border: 1px solid rgba(220, 50, 50, 0.4);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-family: inherit;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.4;
}

/* ── Botão — verde pill idêntico ao do print ───────────────── */
.crm-enep-btn-submit {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 13px 24px !important;
  margin-top: 8px !important;
  background: #20B688 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 30px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  font-family: inherit !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  cursor: pointer !important;
  transition: background .2s ease, transform .15s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.crm-enep-btn-submit:hover {
  background: #1a9e75 !important;
  transform: translateY(-1px) !important;
}

.crm-enep-btn-submit:active {
  transform: translateY(0) !important;
}

.crm-enep-btn-submit:disabled {
  opacity: .65 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* Spinner animado */
.crm-enep-btn-loading {
  display: flex;
  align-items: center;
  gap: 6px;
}
.crm-enep-btn-loading svg {
  animation: crm-spin 1s linear infinite;
  flex-shrink: 0;
}
@keyframes crm-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Estado de Sucesso ─────────────────────────────────────── */
.crm-enep-form-success {
  text-align: center;
  padding: 28px 16px;
}
.crm-enep-success-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  animation: crm-pop .4s cubic-bezier(.175, .885, .32, 1.275);
}
.crm-enep-success-icon svg {
  width: 60px;
  height: 60px;
}
@keyframes crm-pop {
  from { transform: scale(.5); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
.crm-enep-form-success h3 {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: none !important;
  font-family: inherit !important;
}
.crm-enep-form-success p {
  font-size: 14px !important;
  color: #ffffff !important;
  opacity: .85;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.5 !important;
  font-family: inherit !important;
}

/* ── Select de Estado — igual aos inputs (pill branco) ─────────────── */
.crm-enep-field select.crm-enep-select,
.crm-enep-form-wrapper .crm-enep-select {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  padding: 12px 40px 12px 20px !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 30px !important;
  background-color: #ffffff !important;
  color: #333333 !important;
  font-size: 14px !important;
  font-family: inherit !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  /* seta discreta cinza */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aaaaaa' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 18px center !important;
  transition: box-shadow .15s ease !important;
}
.crm-enep-field select.crm-enep-select:focus,
.crm-enep-form-wrapper .crm-enep-select:focus {
  box-shadow: 0 0 0 2px rgba(255,255,255,.5) !important;
  outline: none !important;
}
/* Texto cinza do placeholder (primeira option vazia) */
.crm-enep-form-wrapper .crm-enep-select option[value=""] {
  color: #aaaaaa;
}
.crm-enep-form-wrapper .crm-enep-select option {
  background: #ffffff;
  color: #333333;
}

/* ══════════════════════════════════════════════════════════════════
   FORMULÁRIO — CONTATO COM PROFESSOR
   Idêntico ao screenshot: fundo creme #EFE9DC, bordas pill verde
   escuro #2D4A3E, labels #1A2E25, placeholder cinza-verde, botão
   pill #1C3A2F alinhado à direita.
   ══════════════════════════════════════════════════════════════════ */

.crm-enep-prof-wrapper,
.crm-enep-prof-wrapper * {
  box-sizing: border-box;
}

/* Container — sem padding próprio, o tema/Elementor envolve */
.crm-enep-prof-wrapper {
  width: 100%;
  max-width: 640px;
  font-family: inherit;
}

/* ── Linhas de campo ── */
.crm-enep-prof-row {
  margin-bottom: 14px;
}

/* Linha com 2 colunas (E-mail + Celular) */
.crm-enep-prof-row--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 560px) {
  .crm-enep-prof-row--2col {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ── Campo individual ── */
.crm-enep-prof-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.crm-enep-prof-field--full {
  grid-column: 1 / -1;
}

/* ── Labels — verde-escuro #1A2E25 ── */
.crm-enep-prof-field label,
.crm-enep-prof-wrapper .crm-enep-prof-field label {
  display: block !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #1A2E25 !important;
  margin: 0 0 2px !important;
  padding: 0 !important;
  line-height: 1.4 !important;
  font-family: inherit !important;
  letter-spacing: 0 !important;
}

/* ── Inputs — pill com borda verde #2D4A3E ── */
.crm-enep-prof-field input[type="text"],
.crm-enep-prof-field input[type="email"],
.crm-enep-prof-field input[type="tel"] {
  display: block !important;
  width: 100% !important;
  padding: 12px 18px !important;
  margin: 0 !important;
  border: 1.5px solid #2D4A3E !important;
  border-radius: 50px !important;        /* pill idêntico ao screenshot */
  background: #ffffff !important;
  color: #1A2E25 !important;
  font-size: 14px !important;
  font-family: inherit !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  outline: none !important;
  box-shadow: none !important;
  transition: box-shadow .15s, border-color .15s !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* ── Select de estado — mesmo visual dos inputs pill ── */
.crm-enep-prof-field select,
.crm-enep-prof-field .crm-enep-prof-select {
  display: block !important;
  width: 100% !important;
  padding: 12px 40px 12px 18px !important;
  margin: 0 !important;
  border: 1.5px solid #2D4A3E !important;
  border-radius: 50px !important;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232D4A3E' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 18px center !important;
  color: #1A2E25 !important;
  font-size: 14px !important;
  font-family: inherit !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: box-shadow .15s, border-color .15s !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.crm-enep-prof-field select:focus,
.crm-enep-prof-field .crm-enep-prof-select:focus {
  border-color: #1A2E25 !important;
  box-shadow: 0 0 0 3px rgba(45,74,62,.13) !important;
  outline: none !important;
}
.crm-enep-prof-field select option[value=""],
.crm-enep-prof-field .crm-enep-prof-select option[value=""] {
  color: #7A8C80 !important;
}

/* ── Textarea — cantos arredondados (não pill), borda igual ── */
.crm-enep-prof-field textarea {
  display: block !important;
  width: 100% !important;
  padding: 12px 18px !important;
  margin: 0 !important;
  border: 1.5px solid #2D4A3E !important;
  border-radius: 14px !important;        /* levemente arredondado, igual screenshot */
  background: #ffffff !important;
  color: #1A2E25 !important;
  font-size: 14px !important;
  font-family: inherit !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  outline: none !important;
  box-shadow: none !important;
  resize: vertical !important;           /* handle de resize visível */
  min-height: 100px !important;
  transition: box-shadow .15s, border-color .15s !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* ── Placeholders — cinza-verde #7A8C80 ── */
.crm-enep-prof-field input::placeholder,
.crm-enep-prof-field textarea::placeholder {
  color: #7A8C80 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}

/* ── Focus ── */
.crm-enep-prof-field input:focus,
.crm-enep-prof-field textarea:focus {
  border-color: #1A2E25 !important;
  box-shadow: 0 0 0 3px rgba(45,74,62,.13) !important;
  outline: none !important;
}

/* ── Erro inline ── */
.crm-enep-prof-error {
  background: rgba(200,40,40,.08);
  border: 1px solid rgba(200,40,40,.35);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  color: #b91c1c;
  margin-bottom: 12px;
  line-height: 1.4;
}

/* ── Bloco checkbox política ── */
.crm-enep-prof-privacy {
  margin: 14px 0 18px;
}

/* Label que envolve checkbox + texto */
.crm-enep-prof-checkbox-label {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  cursor: pointer !important;
  font-size: 13px !important;
  color: #1A2E25 !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
  font-family: inherit !important;
}

/* Checkbox nativo — mantido visível e estilizado via accent-color */
.crm-enep-prof-checkbox {
  flex-shrink: 0 !important;
  width: 16px !important;
  height: 16px !important;
  margin-top: 2px !important;
  accent-color: #1A2E25 !important;
  cursor: pointer !important;
  /* remove position:absolute para ficar visível normalmente */
  position: static !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  -webkit-appearance: checkbox !important;
  appearance: checkbox !important;
}

/* Remove o span checkmark customizado — não é necessário */
.crm-enep-prof-checkmark {
  display: none !important;
}

/* Texto da política */
.crm-enep-prof-privacy-text {
  color: #1A2E25 !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}
.crm-enep-prof-privacy-text a {
  color: #1A2E25 !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
}

/* ── Botão Enviar — pill verde-escuro #1C3A2F, alinhado à direita ── */
.crm-enep-prof-submit-wrap {
  display: flex !important;
  justify-content: flex-end !important;
  margin-top: 4px;
}

.crm-enep-prof-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 12px 40px !important;
  background: #1C3A2F !important;        /* verde musgo escuro do screenshot */
  color: #ffffff !important;
  border: none !important;
  border-radius: 50px !important;        /* pill idêntico ao screenshot */
  font-size: 15px !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: background .2s ease, transform .15s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  line-height: 1.3 !important;
  letter-spacing: .01em !important;
}

.crm-enep-prof-btn:hover {
  background: #122a20 !important;
  transform: translateY(-1px) !important;
}
.crm-enep-prof-btn:active {
  transform: translateY(0) !important;
}
.crm-enep-prof-btn:disabled {
  opacity: .6 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* Spinner no botão */
.crm-enep-prof-btn-loading {
  display: flex;
  align-items: center;
  gap: 6px;
}
.crm-enep-prof-btn-loading svg {
  animation: crm-spin 1s linear infinite;
}

/* ── Estado de sucesso ── */
.crm-enep-prof-success {
  text-align: center;
  padding: 32px 16px;
}
.crm-enep-prof-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  animation: crm-pop .4s cubic-bezier(.175,.885,.32,1.275);
}
.crm-enep-prof-success-icon svg {
  width: 64px;
  height: 64px;
}
.crm-enep-prof-success h3 {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #1A2E25 !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: none !important;
  font-family: inherit !important;
}
.crm-enep-prof-success p {
  font-size: 14px !important;
  color: #444 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.6 !important;
  font-family: inherit !important;
}

/* ── Prefixo +55 no campo de telefone ─────────────────────── */
.crm-enep-phone-wrap {
  display: flex !important;
  align-items: center !important;
  background: #ffffff !important;
  border-radius: 30px !important;
  overflow: hidden !important;
}
.crm-enep-phone-prefix {
  flex-shrink: 0 !important;
  padding: 12px 10px 12px 20px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #555 !important;
  background: #ffffff !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
  font-family: inherit !important;
  border-right: 1px solid #e0e0e0 !important;
  user-select: none !important;
}
.crm-enep-phone-wrap input[type="tel"] {
  flex: 1 !important;
  border-radius: 0 30px 30px 0 !important;
  border: none !important;
  padding: 12px 20px 12px 12px !important;
  margin: 0 !important;
  background: #ffffff !important;
  font-size: 14px !important;
  color: #333333 !important;
  font-family: inherit !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 100% !important;
  min-width: 0 !important;
}
.crm-enep-phone-wrap input[type="tel"]::placeholder {
  color: #aaaaaa !important;
  font-size: 14px !important;
}
.crm-enep-phone-wrap:focus-within {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5) !important;
}
.crm-enep-phone-hint {
  display: block !important;
  margin-top: 5px !important;
  font-size: 11px !important;
  color: rgba(255,255,255,0.65) !important;
  font-family: inherit !important;
  padding-left: 4px !important;
}
/* Formulário de professor (fundo claro) */
.crm-enep-prof-field .crm-enep-phone-wrap {
  border: 1px solid #dde3ec !important;
  border-radius: 10px !important;
}
.crm-enep-prof-field .crm-enep-phone-prefix {
  padding: 10px 10px 10px 14px !important;
  border-radius: 9px 0 0 9px !important;
  color: #64748b !important;
}
.crm-enep-prof-field .crm-enep-phone-wrap input[type="tel"] {
  border-radius: 0 9px 9px 0 !important;
  padding: 10px 14px 10px 10px !important;
  background: #fff !important;
}
.crm-enep-prof-field .crm-enep-phone-wrap:focus-within {
  box-shadow: 0 0 0 3px rgba(32,182,136,.15) !important;
  border-color: #20B688 !important;
}
.crm-enep-prof-field .crm-enep-phone-hint {
  color: #94a3b8 !important;
}
