/* ---------------------------------------------------------------------------
 * home-dock.css — Un solo botón flotante
 *
 * Antes la portada tenía cuatro elementos flotando a la vez (Sion, Mi cuenta,
 * Instalar la aplicación y los avisos de agenda). En un celular se tapaban
 * entre ellos y se comían la pantalla.
 *
 * Ahora hay un único botón; al pulsarlo se abre una bandeja con el resto.
 * Los botones originales siguen existiendo en el HTML (con sus eventos
 * intactos): solo se ocultan y la bandeja los pulsa por dentro.
 * ------------------------------------------------------------------------ */

body.has-dock .jerubi-launch,
body.has-dock #accountLaunch { display: none !important; }

.dock { position: fixed; right: 18px; bottom: 18px; z-index: 82; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }

.dock-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px;
  padding: 8px 18px 8px 9px; border: 2px solid #fff; border-radius: 999px;
  background: linear-gradient(135deg, #0d6f8b, #2b8c6f); color: #fff;
  font: 900 1rem Nunito, system-ui, sans-serif; cursor: pointer;
  box-shadow: 0 12px 30px #10364560;
  transition: transform .18s ease, box-shadow .18s ease;
}
.dock-toggle:hover { transform: translateY(-2px); box-shadow: 0 16px 36px #10364566; }
.dock-toggle:focus-visible { outline: 3px solid #ffd45d; outline-offset: 4px; }
.dock-mark {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 50%; background: #ffd45d; color: #17364a; font-size: 1.35rem;
}
.dock-toggle[aria-expanded="true"] .dock-mark { background: #fff; }
.dock-caret { font-size: .8rem; opacity: .85; }

/* Punto de aviso cuando la agenda tiene recordatorios pendientes. */
.dock-dot { position: absolute; top: 4px; right: 6px; width: 13px; height: 13px; border: 2px solid #fff; border-radius: 50%; background: #ff6b4a; }
.dock-toggle { position: relative; }

.dock-tray {
  width: min(304px, calc(100vw - 32px)); padding: 9px; overflow: hidden;
  border: 1px solid #d3e3e7; border-radius: 22px; background: #fffdf7;
  box-shadow: 0 22px 60px #0e2c3b38;
  animation: dockIn .16s ease-out;
}
.dock-tray[hidden] { display: none; }
@keyframes dockIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.dock-tray-title { display: block; padding: 7px 11px 9px; color: #5d7785; font-size: .76rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }

.dock-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px;
  border: 0; border-radius: 15px; background: transparent; color: var(--ink, #17364a);
  font: 800 .98rem Nunito, system-ui, sans-serif; text-align: left; text-decoration: none; cursor: pointer;
}
.dock-item:hover { background: #eaf6fa; }
.dock-item:focus-visible { outline: 3px solid #086f8b; outline-offset: -2px; }
.dock-item[hidden] { display: none; }
.dock-item .dock-icon {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 13px; background: var(--sky, #dff5ff); font-size: 1.2rem;
}
.dock-item small { display: block; color: #5d7785; font-weight: 700; font-size: .79rem; line-height: 1.3; }
.dock-item-sion .dock-icon { background: linear-gradient(145deg, #ffd86b, #55a27f); }
.dock-item-sion .dock-icon img { width: 26px; height: 26px; object-fit: contain; }
.dock-item-cuenta .dock-icon { background: #e4f3ec; }
.dock-item-agenda .dock-icon { background: #fff1d2; }
.dock-item-instalar .dock-icon { background: #e9e3ff; }

/* Los avisos de agenda son una barra fija: que no choquen con el botón. */
body.has-dock .agenda-banner { left: 16px; right: auto; bottom: 18px; transform: none; width: min(520px, calc(100vw - 140px)); }
@media (max-width: 750px) {
  body.has-dock .agenda-banner { left: 12px; right: 12px; bottom: 88px; width: auto; }
}

/* Instrucciones para instalar en iPhone/iPad, donde no existe el aviso del navegador. */
.install-dialog { width: min(460px, 94vw); border: 0; border-radius: 26px; padding: 0; box-shadow: 0 24px 70px #0a243359; color: #17364a; }
.install-dialog::backdrop { background: #091e2bb3; }
.install-card { padding: 26px; text-align: center; }
.install-card .app-mark { display: grid; place-items: center; width: 78px; height: 78px; margin: 0 auto 14px; border-radius: 24px; background: #ffd45d; font-size: 2.4rem; }
.install-card h2 { font-size: 1.7rem; }
.install-card p { max-width: 420px; margin: 10px auto; }
.install-steps { display: grid; gap: 9px; text-align: left; margin: 18px auto; }
.install-step { padding: 12px 14px; border-radius: 13px; background: #eaf6fa; font-weight: 700; }
.install-close { margin-top: 6px; border: 0; border-radius: 999px; padding: 12px 22px; background: #086f8b; color: #fff; font: 900 1rem Nunito, system-ui, sans-serif; cursor: pointer; }

@media (max-width: 600px) {
  .dock { right: 12px; bottom: 12px; }
  .dock-toggle { min-height: 52px; padding: 7px 15px 7px 8px; font-size: .95rem; }
  .dock-mark { width: 37px; height: 37px; }
}

@media (prefers-reduced-motion: reduce) {
  .dock-tray { animation: none; }
  .dock-toggle:hover { transform: none; }
}
