/* ================================================================
   Sonar Promos — Página de Alertas
   Estilos específicos para tutorial de configuração de alertas
   ================================================================ */

/* Hero da página de alertas */
.alertas-hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 340px;
  flex-direction: column;
  gap: 2rem;
}

.alert-visual-demo {
  position: relative;
  z-index: 3;
  background: linear-gradient(150deg, rgba(18, 52, 83, 0.75), rgba(7, 24, 42, 0.85));
  border: 1px solid rgba(104, 197, 255, 0.3);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  max-width: 340px;
  width: 100%;
}

.alert-visual-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #68c5ff;
  margin-bottom: 0.8rem;
}

.alert-visual-term {
  display: inline-block;
  background: rgba(104, 197, 255, 0.15);
  border: 1px solid rgba(104, 197, 255, 0.4);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-family: "Roboto", monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: #d8efff;
  margin-bottom: 1rem;
  word-break: break-word;
}

.alert-visual-config {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.alert-visual-config span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* .source-note base styles now live in css/styles.css (shared with index.html) */
#pecas .source-note {
  margin: 0 auto 2.2rem;
}

/* Grid das 5 peças */
.pieces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.piece {
  background: linear-gradient(150deg, rgba(18, 52, 83, 0.75), rgba(7, 24, 42, 0.85));
  border: 1px solid rgba(104, 197, 255, 0.2);
  border-radius: 16px;
  padding: 1.8rem;
  position: relative;
}

.piece__badge {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: rgba(104, 197, 255, 0.2);
  border: 1px solid rgba(104, 197, 255, 0.4);
  color: #68c5ff;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
}

.piece h3 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  color: var(--text);
  padding-right: 3rem;
}

.piece__lead {
  color: #68c5ff;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 1.2rem;
}

.piece__demo {
  background: rgba(104, 197, 255, 0.08);
  border: 1px solid rgba(104, 197, 255, 0.25);
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
}

.piece__input {
  display: inline-block;
  background: rgba(6, 16, 29, 0.8);
  border: 1px solid rgba(104, 197, 255, 0.3);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-family: "Roboto", monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: #d8efff;
  margin: 0.3rem 0;
  word-break: break-all;
}

.piece__demo-note {
  display: block;
  font-size: 0.75rem;
  color: var(--dim);
  margin-top: 0.5rem;
  font-style: italic;
}

.piece__details {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.piece__details p {
  margin: 0 0 0.8rem;
}

.piece__details p:last-child { margin-bottom: 0; }

.piece__code {
  background: rgba(104, 197, 255, 0.15);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-family: "Roboto", monospace;
  color: #68c5ff;
  font-weight: 600;
}

.piece__details strong {
  color: var(--text);
}

/* Exemplo de correspondência exata */
.piece__toggle-example {
  background: rgba(6, 16, 29, 0.6);
  border-radius: 10px;
  padding: 1rem;
  font-size: 0.9rem;
}

.piece__example-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  color: var(--muted);
}

.piece__example-match {
  color: #68c5ff;
  font-weight: 500;
}

.piece__example-no-match {
  color: #8da8c1;
}

.highlight {
  background: rgba(104, 197, 255, 0.25);
  border-bottom: 2px solid #68c5ff;
  padding: 0 0.2em;
  border-radius: 2px;
}

/* Grid das receitas */
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1.5rem;
}

.recipe-card {
  background: linear-gradient(150deg, rgba(15, 63, 107, 0.7), rgba(7, 24, 42, 0.9));
  border: 1px solid rgba(104, 197, 255, 0.3);
  border-radius: 16px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
}

.recipe-name {
  color: #68c5ff;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  font-family: var(--font-title);
}

.recipe-problem {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(104, 197, 255, 0.2);
}

.recipe-config {
  background: rgba(6, 16, 29, 0.7);
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
  flex-grow: 1;
}

.config-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(104, 197, 255, 0.15);
}

.config-row:last-child {
  border-bottom: 0;
}

.config-label {
  flex: 0 0 auto;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--dim);
  width: 45%;
  min-width: 120px;
}

.config-value {
  flex: 1 1 auto;
  font-family: "Roboto", monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: #d8efff;
  word-break: break-word;
  text-align: right;
}

.recipe-why {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 1rem 0 0;
}

.recipe-why strong {
  color: #68c5ff;
}

/* Erros comuns */
.mistakes-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.mistake {
  background: linear-gradient(150deg, rgba(18, 52, 83, 0.65), rgba(7, 24, 42, 0.8));
  border-left: 3px solid rgba(104, 197, 255, 0.4);
  border-radius: 12px;
  padding: 1.5rem;
}

.mistake h3 {
  color: var(--text);
  font-size: 1.1rem;
  margin: 0 0 0.8rem;
  font-weight: 700;
}

.mistake p {
  color: var(--muted);
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.mistake p:last-child { margin-bottom: 0; }

.mistake strong { color: var(--text); }

/* Nota honesta do teste grátis */
.honest-note {
  background: linear-gradient(135deg, rgba(21, 73, 119, 0.3), rgba(15, 63, 107, 0.25));
  border: 1px solid rgba(104, 197, 255, 0.35);
  border-radius: 18px;
  padding: clamp(1.8rem, 4vw, 2.5rem);
  max-width: 48rem;
  margin: 0 auto;
}

.honest-note h2 {
  color: #68c5ff;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  margin: 0 0 1.2rem;
}

.note-content {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.note-content p {
  margin: 0 0 1rem;
}

.note-content strong {
  color: var(--text);
}

.note-content ul {
  margin: 0.8rem 0 0;
  padding-left: 1.5rem;
  list-style: disc;
}

.note-content li {
  margin: 0.5rem 0;
  color: var(--muted);
}

.note-content em {
  color: #68c5ff;
  font-style: italic;
}

/* Responsivo */
@media (max-width: 760px) {
  .pieces-grid {
    grid-template-columns: 1fr;
  }

  .recipes-grid {
    grid-template-columns: 1fr;
  }

  .piece {
    padding: 1.4rem;
  }

  .piece h3 {
    padding-right: 2.5rem;
  }

  .piece__badge {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
    top: 1rem;
    right: 1rem;
  }

  .config-row {
    flex-direction: column;
    gap: 0.3rem;
  }

  .config-label {
    width: 100%;
  }

  .config-value {
    text-align: left;
  }

  .recipe-card {
    padding: 1.4rem;
  }

  .alert-visual-demo {
    max-width: 100%;
    padding: 1.2rem;
  }
}

@media (max-width: 480px) {
  .piece {
    padding: 1rem;
  }

  .recipe-card {
    padding: 1rem;
  }

  .honest-note {
    padding: 1.25rem;
  }

  .piece__input {
    font-size: 0.8rem;
    padding: 0.5rem 0.7rem;
  }

  .alert-visual-demo {
    padding: 1rem;
  }

  .alert-visual-term {
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
  }
}
