/* ============================================================================
   av-consent-gate.css — porta de entrada da auto-avaliacao
   ========================================================================== */

body.ja-gate-open {
  overflow: hidden;
}

.ja-consent-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(16, 24, 28, 0.72);
  overflow-y: auto;
}

.ja-consent-gate__panel {
  width: 100%;
  max-width: 680px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px 30px 24px;
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  font-family: var(--ja-font, 'Roboto', system-ui, sans-serif);
  color: #1D2124;
}

.ja-consent-gate__title {
  margin: 0 0 10px;
  font-size: 1.45rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--ja-navy, #006072);
}

.ja-consent-gate__intro {
  margin: 0 0 14px;
  font-size: 1rem;
  line-height: 1.6;
  color: #3A3F44;
}

.ja-consent-gate__warn {
  margin: 0 0 18px;
  padding: 11px 13px;
  border-left: 4px solid var(--ja-accent, #A07E52);
  border-radius: 4px;
  background: #FFF8E8;
  color: #3A3F44;
  font-size: 0.94rem;
  line-height: 1.55;
}

.ja-consent-gate__check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  background: #F8FAFC;
  font-size: 0.97rem;
  line-height: 1.55;
  cursor: pointer;
}

.ja-consent-gate__check:hover {
  border-color: var(--ja-navy, #006072);
}

.ja-consent-gate__check--research {
  border-color: #D8C89A;
  background: #FDFBF4;
}

.ja-consent-gate__check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  cursor: pointer;
  accent-color: var(--ja-navy, #006072);
}

.ja-consent-gate__check span {
  flex: 1 1 auto;
}

.ja-consent-gate__note {
  margin: -4px 0 16px;
  padding-left: 2px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #6B7280;
  font-style: italic;
}

.ja-consent-gate__links {
  margin: 0 0 16px;
  font-size: 0.9rem;
}

.ja-consent-gate__link {
  padding: 0;
  border: none;
  background: none;
  color: var(--ja-navy, #006072);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.ja-consent-gate__legal {
  margin: 0 0 16px;
}

.ja-consent-gate__legal pre {
  margin: 0;
  padding: 14px 16px;
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: #FBFCFD;
  font-family: 'DejaVu Sans Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: #334155;
}

.ja-consent-gate__btn {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 8px;
  background: var(--ja-navy, #006072);
  color: #FFFFFF;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.ja-consent-gate__btn:hover:not(:disabled) {
  opacity: 0.9;
}

.ja-consent-gate__btn:disabled {
  background: #B6BCC0;
  cursor: not-allowed;
}

.ja-consent-gate__error {
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: 6px;
  background: #FEF2F2;
  color: #991B1B;
  font-size: 0.9rem;
}

/* Aviso NAO bloqueante: o texto foi aceite, mas o servidor ainda nao
   conseguiu registar a adesao na conta. O questionario abre na mesma. */
.ja-consent-gate__aviso {
  margin: 12px 0 0;
  padding: 9px 12px;
  border-left: 3px solid #D97706;
  border-radius: 4px;
  background: #FFFBEB;
  color: #8A5A00;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* --- responsivo ---------------------------------------------------------- */

@media (max-width: 640px) {
  .ja-consent-gate {
    padding: 0;
    align-items: stretch;
  }

  .ja-consent-gate__panel {
    max-width: 100%;
    max-height: 100vh;
    height: 100%;
    padding: 22px 18px 20px;
    border-radius: 0;
  }

  .ja-consent-gate__title {
    font-size: 1.28rem;
  }

  .ja-consent-gate__check {
    padding: 12px 13px;
    font-size: 0.93rem;
  }
}
