/* Control móvil de Web Push. No altera el topbar de escritorio. */
.zivo-push-panel {
  display: none;
}

@media (max-width: 768px), (display-mode: standalone) {
  app-top-bar .zivo-push-panel {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 10px 8px;
    padding: 10px 11px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(15, 23, 42, 0.8));
  }

  app-top-bar .zivo-push-panel.active {
    border-color: rgba(34, 197, 94, 0.3);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.09), rgba(15, 23, 42, 0.8));
  }

  app-top-bar .zivo-push-copy {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
  }

  app-top-bar .zivo-push-copy > div {
    min-width: 0;
  }

  app-top-bar .zivo-push-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    border-radius: 10px;
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
    font-size: 19px;
  }

  app-top-bar .zivo-push-panel.active .zivo-push-icon {
    background: rgba(34, 197, 94, 0.13);
    color: #86efac;
  }

  app-top-bar .zivo-push-copy strong,
  app-top-bar .zivo-push-status {
    display: block;
  }

  app-top-bar .zivo-push-copy strong {
    color: #f8fafc;
    font-size: 0.75rem;
    line-height: 1.25;
  }

  app-top-bar .zivo-push-status {
    margin-top: 3px;
    color: #94a3b8;
    font-size: 0.66rem;
    line-height: 1.3;
  }

  app-top-bar .zivo-push-status.error {
    color: #fca5a5;
  }

  app-top-bar .zivo-push-action {
    min-width: 78px;
    min-height: 36px;
    flex: 0 0 auto;
    padding: 0 11px;
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 10px;
    background: rgba(34, 211, 238, 0.1);
    color: #cffafe;
    font-size: 0.69rem;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
  }

  app-top-bar .zivo-push-panel.active .zivo-push-action {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.1);
    color: #bbf7d0;
  }

  app-top-bar .zivo-push-action:disabled {
    opacity: 0.55;
    cursor: default;
  }

  /*
   * Bandeja móvil compacta.
   * El encabezado, activación Push, filtros y pie permanecen visibles;
   * únicamente la lista de notificaciones hace scroll. Esto evita que el
   * desplegable cubra una porción excesiva de los filtros de la pantalla.
   */
  app-top-bar .bandeja {
    height: auto;
    min-height: 0;
    max-height: min(50dvh, 430px);
    overflow: hidden;
  }

  app-top-bar .bandeja-inner {
    height: auto;
    max-height: min(50dvh, 430px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  app-top-bar .titulo {
    flex: 0 0 auto;
    padding: 10px 14px 9px;
  }

  app-top-bar .zivo-push-panel {
    min-height: 54px;
    flex: 0 0 auto;
    gap: 8px;
    margin: 0 8px 6px;
    padding: 7px 9px;
    border-radius: 12px;
  }

  app-top-bar .zivo-push-copy {
    gap: 7px;
  }

  app-top-bar .zivo-push-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 9px;
    font-size: 17px;
  }

  app-top-bar .zivo-push-copy strong {
    font-size: 0.7rem;
  }

  app-top-bar .zivo-push-status {
    margin-top: 2px;
    font-size: 0.61rem;
    line-height: 1.2;
  }

  app-top-bar .zivo-push-action {
    min-width: 70px;
    min-height: 32px;
    padding: 0 9px;
    border-radius: 9px;
    font-size: 0.65rem;
  }

  app-top-bar .filtros {
    flex: 0 0 auto;
    gap: 6px;
    padding: 6px 8px;
  }

  app-top-bar .filtro {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  app-top-bar .lista-scroll {
    flex: 1 1 auto;
    min-height: 94px;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  app-top-bar .notificacion {
    min-height: 0;
    padding: 9px 12px;
  }

  app-top-bar .notificacion p {
    margin-bottom: 3px;
    font-size: 0.78rem;
    line-height: 1.32;
  }

  app-top-bar .notificacion small {
    font-size: 0.68rem;
  }

  app-top-bar .footer {
    flex: 0 0 auto;
    padding: 6px 8px;
  }

  app-top-bar .ver-todas-btn {
    min-height: 34px;
    padding: 0 10px;
  }
}

@media (max-width: 420px) {
  app-top-bar .bandeja,
  app-top-bar .bandeja-inner {
    max-height: min(46dvh, 380px);
  }

  app-top-bar .zivo-push-panel {
    min-height: 50px;
    margin-inline: 7px;
    padding: 6px 8px;
  }

  app-top-bar .zivo-push-status {
    max-width: 170px;
  }
}
