/*
 * Atutono como app instalable: avisos de instalación, aviso de pago y manual.
 * Colores y radios de Atutono (studio.css :root), escritos acá para que funcione
 * también en páginas sin studio.css (login, registro, manual).
 * Los avisos van EN EL FLUJO de la página (nunca flotando sobre la letra o los
 * acordes); solo el aviso del pago es flotante y se va solo.
 */
.at-app-aviso {
    display: flex; align-items: center; gap: 12px;
    margin: 0 0 16px; padding: 12px 12px 12px 16px;
    background: #0e0e0e; border: 1px solid #2a2a2f; border-radius: 12px;
    color: #ececf1; font: 500 14px/1.45 "Inter", system-ui, -apple-system, sans-serif;
}
.at-app-aviso[hidden] { display: none !important; }
/* En el Studio el aviso va arriba del título, con el mismo aire que las tarjetas. */
[data-at-app-avisos="studio"] .at-app-aviso { margin: 12px 14px 4px; }
.at-app-aviso-icono { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 9px; display: block; }
.at-app-aviso-txt { flex: 1 1 auto; min-width: 0; }
.at-app-aviso-txt a { color: #4ddbe6; font-weight: 600; text-decoration: none; white-space: nowrap; }
.at-app-aviso-txt a:hover { text-decoration: underline; }
.at-app-aviso-btn {
    flex: 0 0 auto; font: 600 14px/1 "Inter", system-ui, sans-serif; color: #0c0c0d;
    background: #4ddbe6; border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer;
}
.at-app-aviso-btn:hover { filter: brightness(1.08); }
.at-app-aviso-x {
    flex: 0 0 auto; width: 32px; height: 32px; margin-left: -4px; padding: 0;
    display: grid; place-items: center; background: transparent; border: 0; border-radius: 8px;
    color: #80818a; font-size: 20px; line-height: 1; cursor: pointer;
}
.at-app-aviso-x:hover { color: #ececf1; background: rgba(255, 255, 255, .06); }
@media (max-width: 480px) {
    .at-app-aviso { flex-wrap: wrap; }
    .at-app-aviso-txt { flex-basis: calc(100% - 92px); }
    .at-app-aviso-btn { margin-left: 48px; }
}

/* Instalar, bien visible, en el Studio (tanda enlace primero, 21/10): la tarjeta arriba, con el borde del degradado
   del logo, y el botón fijo abajo. Abierta como app no se ve (y atutono-app.js ni las crea). */
.at-app-tarjeta {
    display: flex; align-items: center; gap: 14px; margin: 12px 14px 4px; padding: 16px;
    border-radius: 16px; color: #ececf1; font: 500 14px/1.45 "Inter", system-ui, -apple-system, sans-serif;
    background: linear-gradient(#111114, #111114) padding-box, linear-gradient(120deg, #4ddbe6, #8b6cff, #ff5cb0) border-box;
    border: 1.5px solid transparent; box-shadow: 0 8px 28px rgba(139, 108, 255, .18);
}
.at-app-tarjeta-icono { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 13px; display: block; }
.at-app-tarjeta-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.at-app-tarjeta-txt b { font: 700 17px/1.25 "Space Grotesk", "Inter", system-ui, sans-serif; }
.at-app-tarjeta-txt span { color: #b4b6bc; }
.at-app-tarjeta-botones { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.at-app-tarjeta-si {
    font: 700 15px/1 "Inter", system-ui, sans-serif; color: #0c0c0d; border: 0; border-radius: 11px; padding: 12px 18px; cursor: pointer;
    background: linear-gradient(120deg, #4ddbe6, #8b6cff 60%, #ff5cb0);
}
.at-app-tarjeta-no { font: 600 13px/1 "Inter", system-ui, sans-serif; color: #9a9ba3; background: none; border: 0; padding: 8px; cursor: pointer; }
.at-app-tarjeta-no:hover { color: #ececf1; }
@media (max-width: 520px) {
    .at-app-tarjeta { flex-wrap: wrap; }
    .at-app-tarjeta-txt { flex-basis: calc(100% - 70px); }
    .at-app-tarjeta-botones { flex-basis: 100%; flex-direction: row; }
    .at-app-tarjeta-si { flex: 1 1 auto; }
}
.at-app-fijo {
    position: fixed; z-index: 9000; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 999px; border: 0; cursor: pointer;
    font: 700 14px/1 "Inter", system-ui, sans-serif; color: #0c0c0d;
    background: linear-gradient(120deg, #4ddbe6, #8b6cff 60%, #ff5cb0); box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
    transition: opacity .2s, transform .2s;
}
body.at-con-fijo { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.at-app-fijo.tapado { opacity: 0; transform: translateY(12px); pointer-events: none; }
/* Con una ventana abierta, el tour o el teclado (body sin scroll), el botón fijo no estorba. */
body[style*="overflow: hidden"] .at-app-fijo, html.at-tour-abierto .at-app-fijo { display: none; }
@media (display-mode: standalone), (display-mode: fullscreen) {
    .at-app-tarjeta, .at-app-fijo { display: none !important; }
}
html.at-app-instalada .at-app-tarjeta, html.at-app-instalada .at-app-fijo { display: none !important; }
html.at-app-instalada body.at-con-fijo { padding-bottom: 0; }

/* Aviso del pago al volver a la app: flotante abajo, respeta el indicador de inicio. */
.at-app-toast {
    position: fixed; left: 50%; transform: translateX(-50%); z-index: 100001;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: min(440px, calc(100% - 32px)); box-sizing: border-box;
    padding: 14px 16px; border-radius: 12px; background: #0e0e0e; border: 1px solid #4ddbe6;
    color: #ececf1; font: 500 14px/1.45 "Inter", system-ui, sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}

/* ── Manual /atutono/instalar ─────────────────────────────────────────────── */
.at-manual { max-width: 680px; margin: 0 auto; padding: 24px 16px 48px; color: #ececf1;
    font: 400 16px/1.6 "Inter", system-ui, -apple-system, sans-serif; }
.at-manual h1 { font: 700 30px/1.2 "Space Grotesk", "Inter", system-ui, sans-serif; margin: 8px 0 12px; color: #ececf1; }
.at-manual .at-manual-intro { color: #b4b6bc; margin: 0 0 24px; }
.at-manual section { background: #0e0e0e; border: 1px solid #2a2a2f; border-radius: 16px; padding: 20px 20px 8px; margin: 0 0 16px; }
.at-manual h2 { font: 600 20px/1.3 "Space Grotesk", "Inter", system-ui, sans-serif; margin: 0 0 12px; color: #ececf1; }
.at-manual ol { margin: 0 0 12px; padding-left: 22px; }
.at-manual li { margin: 0 0 10px; color: #ececf1; }
.at-manual p { margin: 0 0 12px; color: #b4b6bc; }
.at-manual .at-manual-btn {
    display: inline-block; margin: 8px 0 4px; font: 600 15px/1 "Inter", system-ui, sans-serif; color: #0c0c0d;
    background: #4ddbe6; border: 0; border-radius: 10px; padding: 12px 18px; cursor: pointer; text-decoration: none;
}
.at-manual .at-manual-btn[hidden] { display: none; }
.at-manual .at-manual-tuyo { border-color: #4ddbe6; }
.at-manual .at-manual-faq h2 { font-size: 17px; margin-top: 4px; }

/* Dentro de la app instalada (Android y iPhone) no va «Otras herramientas de SagaLabs»:
   se abría dentro de la app. En el navegador queda igual. La media query cubre el primer
   pintado; la clase la pone atutono-app.js (iPhone viejo sin display-mode). */
@media (display-mode: standalone), (display-mode: fullscreen) {
    .at-header a.at-otras { display: none; }
}
html.at-app-instalada .at-header a.at-otras { display: none; }
