/* =========================
   FORMULÁRIOS
========================= */
form {
  background-color: var(--bg-panel, #1e1e1e);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

form label {
  display: block;
  margin-bottom: 10px;
  color: var(--primary-color, #00aaff);
  font-weight: bold;
}

form input[type="text"],
form input[type="number"],
form select,
form input[type="file"],
form input[type="textarea"],
form input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: none;
  border-radius: 4px;
  font-size: 1em;
}

/* Estilizando o input file */
input[type="file"] {
  background-color: var(--primary-color, #00aaff);
  color: #000;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

input[type="file"]:hover {
  background-color: #0088cc;
  border-color: #0088cc;
}

.file-info {
  font-size: 0.9em;
  color: #666;
  margin-top: 5px;
}

/* Botões */
form input[type="submit"] {
  width: 30%;
  padding: 10px;
  margin: 0 auto 20px;
  display: block;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  background-color: var(--primary-color, #00aaff);
  color: #000;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

form input[type="submit"]:hover {
  background-color: #00aaff83;
}

/* ============================= */
/* MODAL GLOBAL                  */
/* ============================= */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

/* JS controla visibilidade via: element.style.display = "flex" / "none" */

.modal .modal-content {
  background: var(--bg-panel, #1e1e1e);
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  max-width: 450px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal .modal-content h5 {
  margin: 0 0 12px;
  color: var(--primary-color, #00aaff);
  font-size: 1.1rem;
}

.modal .modal-content p {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 15px;
}

.modal-header h5 {
  margin: 0;
  color: white;
}

.btn-close {
  font-size: 1.5rem;
  cursor: pointer;
  border: none;
  background: none;
  color: white;
}

/* ============================= */
/* MODAL PAT (info-modal)        */
/* ============================= */

#patInfoModal .info-modal {
  width: 600px;
  max-width: 90%;
  background: var(--bg-panel, #1e1e1e);
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
  animation: patFadeIn 0.25s ease-out;
  color: var(--text-light, #fff);
  text-align: left;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

#patInfoModal .modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color, #00aaff);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #2a2a2a;
}

#patInfoModal .modal-body {
  text-align: left;
  line-height: 1.7;
  font-size: 0.9rem;
  color: #bbb;
}

#patInfoModal .modal-body p {
  margin-bottom: 12px;
}

#patInfoModal .modal-body strong {
  color: var(--text-light, #fff);
}

#patInfoModal ol {
  margin-left: 20px;
  padding-left: 15px;
}

#patInfoModal ul {
  margin-left: 20px;
  padding-left: 15px;
}

#patInfoModal li {
  margin-bottom: 8px;
  line-height: 1.5;
}

#patInfoModal .modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #2a2a2a;
}

#patInfoModal button {
  background-color: var(--primary-color, #00aaff);
  color: #000;
  border: none;
  padding: 8px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

#patInfoModal button:hover {
  background-color: #0095e0;
}

@keyframes patFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================
   SPINNER
========================= */
.spinner-border {
  border: 3px solid #333;
  border-top: 3px solid var(--primary-color, #00aaff);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  animation: spin 0.8s linear infinite;
  display: block;
  margin: 0 auto;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* =========================
   CARDS
========================= */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  padding: 40px;
  background-color: #f7f7f7;
  border-radius: 10px;
}

.card {
  width: 280px;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-icon {
  background-color: #202020;
  color: white;
  text-align: center;
  padding: 20px;
}

.card-content {
  padding: 20px;
  text-align: center;
}

.card-content h3 {
  margin: 0;
  font-size: 1.3em;
  color: #333;
  font-weight: 600;
}

.card-content p {
  font-size: 1em;
  color: #777;
  margin-top: 10px;
}

.card-content h3, .card-content p {
  transition: color 0.3s ease;
}

.card:hover .card-content h3 {
  color: #4CAF50;
}

.card:hover .card-content p {
  color: #555;
}

/* =========================
   RESULTADO / MARKDOWN
========================= */
.resultado {
  background-color: var(--bg-panel);
  border-radius: 12px;
  padding: 20px;
  padding-top: 56px;
  color: #f0f0f0;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.resultado .copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: var(--primary-color, #00aaff);
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.85em;
  font-weight: bold;
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

.resultado .copy-btn:hover {
  opacity: 0.85;
}

.resultado .text-stats {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85em;
  color: #ccc;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

#generated-text {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

#generated-text p {
  margin-bottom: 12px;
}

#generated-text pre {
  background-color: #111;
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
}

#generated-text code {
  font-family: monospace;
  font-size: 0.95em;
}

#markdown-content {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  background-color: #1e1e1e;
  color: #ffffff;
  padding: 20px;
  border-radius: 8px;
  font-family: monospace;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 1rem;
  line-height: 1.5;
}

/* =========================
   TABELAS
========================= */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: #2a2a2a;
}

th {
  background-color: var(--primary-color);
  color: #fff;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #444;
}

/* =========================
   Font Awesome Fake Select
========================= */
.fa-select {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
  font-size: 1em;
}

.fa-select .fa-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #000;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #fff;
  cursor: pointer;
}

.fa-select .fa-selected i {
  color: #555;
}

.fa-select .fa-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  margin-top: 4px;
  padding: 0;
  list-style: none;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  z-index: 50;
}

.fa-select.open .fa-options {
  display: block;
  color: #000;
}

.fa-select .fa-options li {
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #000;
}

.fa-select .fa-options li:hover {
  background-color: #f2f2f2;
}

.fa-select .fa-options i {
  color: #666;
}

/* =========================
   Date
========================= */
.date-container {
  display: flex;
  gap: 40px;
  margin-bottom: 20px;
}

.input-wrapper {
  flex: 1;
}

.input-wrapper label {
  display: block;
  margin-bottom: 5px;
  color: var(--primary-color, #00aaff);
  font-weight: bold;
}

.input-wrapper input[type="date"] {
  width: 96%;
  padding: 10px;
  border: none;
  border-radius: 4px;
  font-size: 1em;
}

/* =========================
   Home - QA Hub
========================= */
header .subtitle {
  font-size: 1rem;
  color: #666;
}

.intro {
  max-width: 900px;
  margin-bottom: 40px;
}

.intro p {
  font-size: 1rem;
  line-height: 1.7;
  color: #ffffff;
  margin-bottom: 15px;
}

.features {
  margin-bottom: 40px;
}

.features h2 {
  font-size: 1.6rem;
  margin-bottom: 15px;
  color: #ffffff;
}

.features ul {
  list-style: none;
  padding-left: 0;
}

.features ul li {
  font-size: 1rem;
  color: #ffffff;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-note {
  max-width: 900px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.footer-note p {
  font-size: 0.95rem;
  color: #ffffff;
  line-height: 1.6;
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .features h2 {
    font-size: 1.4rem;
  }

  .intro,
  .footer-note {
    max-width: 100%;
  }
}
