/* Asteriq · Guía de automatización. Usa los tokens, la tipografía y el foco de styles.css. */

/* Acceso integrado en la sección de contacto */
.guide-entry {
  margin-top: 32px;
  padding: 22px 24px;
  border: 1px solid rgba(111, 230, 199, .3);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
  max-width: 34em;
}
.guide-entry[hidden] { display: none; }
.guide-entry h3 { font-size: 1.2rem; margin-bottom: 6px; }
.guide-entry p { color: rgba(255, 255, 255, .86); margin-bottom: 16px; }

/* Diálogo */
.aq-dialog {
  width: min(600px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
  overscroll-behavior: contain;
}
.aq-dialog::backdrop { background: rgba(17, 45, 43, .72); }
.aq-dialog *, .aq-dialog *::before, .aq-dialog *::after { box-sizing: border-box; }

.aq-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.aq-brand { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.04em; color: var(--green-900); }
.aq-brand span { color: var(--teal-700); }

.aq-dialog .aq-label {
  margin: 20px 0 8px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal-700);
}
.aq-dialog h2 {
  margin: 0 0 16px;
  font-size: clamp(1.45rem, 1.2rem + 1.2vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
/* El título recibe el foco para que se anuncie cada paso; no es un control */
.aq-dialog h2:focus { outline: none; }
.aq-dialog p { margin: 0 0 14px; }
.aq-muted { color: var(--muted); }
.aq-progress { font-size: 1rem; font-weight: 700; color: var(--teal-700); }
.aq-dialog .aq-small { margin: 12px 0; font-size: .9375rem; color: var(--muted); }
.aq-note {
  padding: 12px 16px;
  border-left: 4px solid var(--teal-700);
  border-radius: 0 10px 10px 0;
  background: var(--tint);
  font-size: 1rem;
}

/* Acciones: botones de la web a ancho completo */
.aq-action { display: flex; width: 100%; margin: 10px 0; }

/* Opciones de respuesta */
.aq-options { display: grid; gap: 10px; margin-bottom: 8px; }
.aq-option {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid #A9BDB9;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.aq-option:hover { background: var(--tint); border-color: var(--teal-700); }
.aq-option[aria-pressed="true"] {
  border: 2px solid var(--teal-700);
  background: var(--tint);
  font-weight: 700;
}

.aq-dialog label { display: block; font-weight: 650; margin-top: 4px; }
.aq-dialog textarea {
  display: block;
  width: 100%;
  min-height: 240px;
  margin: 8px 0 12px;
  padding: 12px 14px;
  border: 1px solid #A9BDB9;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
}
.aq-dialog details { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.aq-dialog summary { min-height: 44px; padding: 10px 0; font-weight: 650; cursor: pointer; }
.aq-dialog details p { color: var(--muted); }

.aq-status { font-size: 1rem; font-weight: 650; color: var(--teal-700); }
.aq-status:empty { display: none; }

/* Bloqueo del fondo en body: se traslada a la ventana y la cabecera fija no se mueve
   (en html dejaría a body, con overflow-x: hidden, como contenedor propio) */
html.aq-modal-open body { overflow: hidden; }

@media (max-width: 440px) {
  .aq-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .guide-entry { padding: 20px 18px; }
}
