/* CODex-HIST 2026-01-02 (#help-widget-css):
   Indice: help_widget.css.
   Proposito: estilizar botao flutuante e modal da central de ajuda.
   Historico: cria layout do widget global de tickets. */
/* CODex-HIST 2026-01-09 (#help-widget-css-external-email):
   Indice: help_widget.css (formulario).
   Proposito: garantir espaco e estilo dos campos no modal sem Bootstrap.
   Historico: adiciona estilos para inputs/labels no widget externo. */
.tm-help-widget {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1200;
}

.tm-help-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, 0.35);
  background: linear-gradient(120deg, #5eead4, #22d3ee);
  color: #04121d;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 0 18px 35px rgba(14, 116, 144, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tm-help-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(14, 116, 144, 0.45);
  color: #04121d;
}

.tm-help-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1300;
}

.tm-help-modal.is-open {
  display: flex;
}

.tm-help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
}

.tm-help-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 440px);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #0b1120;
  padding: 1.2rem 1.4rem;
  box-shadow: 0 30px 60px rgba(2, 6, 23, 0.55);
}

.tm-help-panel .mb-2 {
  margin-bottom: 0.6rem;
}

.tm-help-panel .form-label {
  display: block;
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
  color: rgba(148, 163, 184, 0.9);
}

.tm-help-panel .form-control {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #0f172a;
  color: #e2e8f0;
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
}

.tm-help-panel .form-control:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.tm-help-panel textarea.form-control {
  min-height: 96px;
  resize: vertical;
}

.tm-help-panel .text-secondary {
  color: rgba(148, 163, 184, 0.85);
}

.tm-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.tm-help-header h2 {
  font-size: 1.1rem;
  margin: 0;
}

.tm-help-close {
  border: none;
  background: rgba(148, 163, 184, 0.1);
  color: #e2e8f0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tm-help-subtitle {
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

.tm-help-note {
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.9);
  margin-top: 0.5rem;
}

.tm-help-status {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
  display: none;
}

.tm-help-status.is-visible {
  display: block;
}

.tm-help-status.is-error {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
}

.tm-help-status.is-success {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(22, 163, 74, 0.18);
  color: #bbf7d0;
}

.tm-help-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tm-help-success {
  display: none;
  margin-top: 0.75rem;
}

.tm-help-success.is-visible {
  display: block;
}

@media (max-width: 575.98px) {
  .tm-help-widget {
    right: 1rem;
    bottom: 1rem;
  }
  .tm-help-button span {
    display: none;
  }
}
