/* Componentes básicos complementares ao Tailwind (carregado via CDN) */

:root {
  --marca-600: #0d9488;
  --marca-700: #0f766e;
  --borda: #e2e8f0;
}

/* Rolagem suave para âncoras internas */
html {
  scroll-behavior: smooth;
}

/* Indicador de carregamento do HTMX */
.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator {
  display: inline-flex;
}
.htmx-request.htmx-indicator {
  display: inline-flex;
}

/* Barra de rolagem discreta em tabelas grandes */
.tabela-rolavel::-webkit-scrollbar {
  height: 8px;
}
.tabela-rolavel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

/* Rótulo padrão de campos de formulário */
.campo-rotulo {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #334155;
}

/* Campo de entrada padrão (input/select/textarea) */
.campo {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--borda);
  background-color: #fff;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: #1e293b;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.campo:focus {
  outline: none;
  border-color: var(--marca-600);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.campo::placeholder {
  color: #94a3b8;
}

select.campo {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 1rem;
  padding-right: 2rem;
}

/* Botão principal */
.btn-primario {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  background-color: var(--marca-600);
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  transition: background-color 0.15s ease;
}
.btn-primario:hover {
  background-color: var(--marca-700);
}

/* Botão secundário (contorno) */
.btn-secundario {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background-color: #fff;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  transition: background-color 0.15s ease;
}
.btn-secundario:hover {
  background-color: #f8fafc;
}

/* Impede o zoom automático em campos no iOS mantendo o texto legível */
@media (max-width: 640px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}
