/* ── Contact Forms — tema escuro (alinhado à identidade do site) ────────── */
/* Paleta de referência: assets/css/style.css (.contact-modal__field, .contact-modal__actions) */

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.contact-form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form__group--full {
  grid-column: 1 / -1;
}

.contact-form__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.78);
}

.contact-form__label span[aria-label="obrigatório"] {
  color: #51e02e;
  margin-left: 2px;
}

/* ── Inputs ───────────────────────────────────────────────── */

.contact-form__input,
.contact-form__textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #1a1a1a;
  color: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form__input::placeholder,
.contact-form__textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  outline: none;
  border-color: #51e02e;
  box-shadow: 0 0 0 3px rgba(81, 224, 46, 0.15);
}

.contact-form__input:disabled,
.contact-form__textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.contact-form__textarea {
  resize: vertical;
  min-height: 110px;
}

/* Estado de erro — aplicado via JS (classe is-invalid), nunca pelo :invalid nativo,
   para não pintar campos de vermelho antes do usuário tentar enviar. */
.contact-form__input.is-invalid,
.contact-form__textarea.is-invalid {
  border-color: #f87171;
}

/* ── Checkbox / Privacidade ───────────────────────────────── */

.contact-form__checkbox-group {
  grid-column: 1 / -1;
}

.contact-form__checkbox-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.contact-form__checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: #1a1a1a;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, background-color 0.2s;
}

.contact-form__checkbox:checked {
  background: #51e02e;
  border-color: #51e02e;
}

.contact-form__checkbox:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #0d0d0d;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.contact-form__checkbox:focus-visible {
  outline: 2px solid #51e02e;
  outline-offset: 2px;
}

.contact-form__checkbox-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.65);
}

.contact-form__checkbox-sublabel {
  margin-top: -2px;
}

.contact-form__privacy-toggle {
  color: #51e02e;
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-form__privacy-toggle:hover {
  opacity: 0.8;
}

.contact-form__privacy-details {
  font-size: 12px;
  line-height: 1.6;
  padding: 10px 12px;
  background-color: rgba(255, 255, 255, 0.05);
  border-left: 2px solid #51e02e;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.6);
}

.contact-form__privacy-details a {
  color: #51e02e;
}

/* ── Botão ────────────────────────────────────────────────── */

.contact-form__button {
  grid-column: 1 / -1;
  justify-self: end;
  border: 0;
  border-radius: 999px;
  padding: 11px 30px;
  background: #51e02e;
  color: #0d0d0d;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.contact-form__button:hover:not(:disabled) {
  opacity: 0.88;
}

.contact-form__button:active:not(:disabled) {
  transform: scale(0.98);
}

.contact-form__button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.contact-form__button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Mensagens de sucesso/erro ────────────────────────────── */

.contact-form__message {
  grid-column: 1 / -1;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
}

.contact-form__message:not(.is-error) {
  background-color: rgba(81, 224, 46, 0.12);
  color: #86efac;
  border: 1px solid rgba(81, 224, 46, 0.35);
}

.contact-form__message.is-error {
  background-color: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.contact-form__message[hidden] {
  display: none !important;
}

/* ── PowerBI Container ────────────────────────────────────── */

[data-pbi-container] {
  margin-top: 3rem;
}

[data-pbi-container][hidden] {
  display: none !important;
}

[data-pbi-container] iframe {
  width: 100%;
  height: 900px;
  border: none;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 640px) {
  .contact-form {
    grid-template-columns: 1fr;
  }

  .contact-form__input,
  .contact-form__textarea {
    font-size: 16px; /* previne zoom automático no iOS */
  }

  .contact-form__button {
    width: 100%;
    justify-self: stretch;
  }

  [data-pbi-container] iframe {
    height: 600px;
  }
}
