/* RESET */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Ubuntu, Arial, sans-serif;
  background: #ffffff;
  color: #1f2933;
  line-height: 1.6;
}

/* TOPBAR */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.logo {
  font-weight: 600;
  font-size: 1.1rem;
}

#apiBtn {
  background: transparent;
  border: 1px solid #d1d5db;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  flex: 0 0 auto;
}

#apiBtn:hover {
  background: #f3f4f6;
}

/* LAYOUT */

.container {
  max-width: 1100px;
  margin: auto;
  padding: 32px 16px;
}

/* HERO */

.hero {
  text-align: center;
  padding: 48px 16px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 32px;
}

/* TOOL */

.tool {
  max-width: 500px;
  margin: auto;
}

.tool input {
  width: 100%;
  font-family: monospace;
  font-size: 1.8rem;
  padding: 14px;
  text-align: center;
  border: 2px solid #d1d5db;
  border-radius: 10px;
}

.buttons {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

button {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

/* BUTTONS */

.primary {
  background: #2563eb;
  color: #fff;
}

.primary:hover {
  background: #1d4ed8;
}

.secondary {
  background: #f3f4f6;
}

.secondary:hover {
  background: #e5e7eb;
}

/* CONTENT */

.content,
.faq {
  margin-top: 64px;
}

.content h2,
.faq h2 {
  font-size: 1.8rem;
  margin-bottom: 24px;
}

.content p {
  margin-bottom: 16px;
}

/* FAQ */

.faq details {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.faq summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq summary::after {
  content: "▼";
  position: absolute;
  right: 0;
  transition: transform 0.3s ease;
}

details[open] summary::after {
  transform: rotate(180deg);
}

.faq p {
  margin-top: 12px;
  color: #374151;
}

/* TOAST */

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  font-size: 0.9rem;
}

#toast.show {
  opacity: 1;
}

/* RESPONSIVE */

@media (max-width: 600px) {

  .buttons {
    flex-direction: column;
  }

  .tool input {
    font-size: 1.4rem;
  }

}

/* --- MODAL STYLES (Adicione ao final do arquivo) --- */

.modal-overlay {
  display: none; /* Oculto por padrão */
  position: fixed;
  z-index: 1000; /* Fica acima de tudo */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(31, 41, 51, 0.7); /* Usando tons do seu tema */
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s;
}

.modal-content {
  background-color: #ffffff;
  margin: 10% auto;
  padding: 32px;
  border-radius: 12px;
  width: 90%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  text-align: left; /* Garante alinhamento do form */
}

/* Tipografia do Modal */
.modal-content h3 {
  margin-bottom: 12px;
  color: #1f2933;
  font-size: 1.4rem;
}

.modal-content p {
  margin-bottom: 24px;
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Botão Fechar (X) */
.close-modal {
  position: absolute;
  right: 20px;
  top: 16px;
  color: #9ca3af;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.close-modal:hover {
  color: #1f2933;
}

/* Formulário */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 2px solid #e5e7eb; /* Mesmo estilo do seu input principal */
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #2563eb;
}

/* Botão Full Width específico do modal */
.btn-full {
  width: 100%;
  margin-top: 8px;
}

/* Status do envio */
#form-status {
  margin-top: 12px;
  font-size: 0.9rem;
  text-align: center;
  min-height: 20px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
