/* clube-de-vantagens/app.css — barra fixa de aplicativo (celular) e ajustes de PWA */
.app-barra { display: none; }
@media (max-width: 860px) {
  body.com-app-barra { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  .app-barra {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255,255,255, .97); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-top: 1px solid #E6E1D6; box-shadow: 0 -8px 24px -18px rgba(10,27,61, .45);
    padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
  }
  .app-barra a {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 4px;
    color: #6B7090; text-decoration: none; font: 700 .7rem/1.1 "Archivo", "Arial Narrow", sans-serif; letter-spacing: .01em;
    border-radius: 12px; -webkit-tap-highlight-color: transparent;
  }
  .app-barra a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .app-barra svg { width: 24px; height: 24px; }
  .app-barra a[aria-current="page"] { color: #087DBC; }
  .app-barra a[aria-current="page"] svg { stroke-width: 2.4; }
  .app-barra a:active { background: #F8F5EE; }
  .app-barra a:focus-visible { outline: 3px solid #FFD23F; outline-offset: -3px; }
  /* com a barra de baixo, os links do topo saem (ficam só os botões, como "Sair") */
  body.com-app-barra .pb-topo nav a { display: none; }
  /* no app instalado o topo fica mais enxuto */
  .app-standalone .pb-topo nav { display: none; }
}
/* cartão de "instalar o app" */
.app-instalar { display: flex; align-items: center; gap: 12px; background: #0A1B3D; color: #fff; border-radius: 14px; padding: 12px 14px; }
.app-instalar img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.app-instalar div { flex: 1; min-width: 0; }
.app-instalar b { display: block; font-size: .95rem; }
.app-instalar small { opacity: .8; font-size: .82rem; }
.app-instalar button { background: #FFD23F; color: #0A1B3D; border: 0; border-radius: 10px; padding: 9px 12px; font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; }

/* botão "Instalar app": fixo até o app ser instalado */
.app-fab {
  position: fixed; z-index: 70; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #FFDD66 0%, #FFD23F 55%, #F2BC1B 100%); color: #0A1B3D;
  font: 800 .92rem/1 "Archivo", "Arial Narrow", sans-serif; padding: 12px 16px 12px 13px; border-radius: 999px;
  box-shadow: 0 10px 24px -10px rgba(8,125,188, .55), 0 2px 0 #C99A0E; animation: app-fab-entra .4s ease-out both;
}
.app-fab svg { width: 22px; height: 22px; flex: none; }
.app-fab:hover { transform: translateY(-1px); }
.app-fab:focus-visible { outline: 3px solid #087DBC; outline-offset: 3px; }
.app-fab[hidden] { display: none; }
body.com-app-barra .app-fab { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
@keyframes app-fab-entra { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .app-fab { animation: none; } }
.app-folha { position: fixed; inset: 0; z-index: 80; background: rgba(0, 20, 50, .55); display: grid; align-items: end; justify-items: center; padding: 16px; }
.app-folha[hidden] { display: none; }
.app-folha-caixa { background: #FFFFFF; color: #0A1B3D; border-radius: 20px; padding: 22px 20px calc(20px + env(safe-area-inset-bottom, 0px)); width: 100%; max-width: 420px;
  display: grid; gap: 10px; justify-items: center; text-align: center; font-family: "Archivo", "Arial Narrow", sans-serif; box-shadow: 0 -10px 40px -10px rgba(0,0,0,.4); }
.app-folha-caixa img { width: 64px; height: 64px; border-radius: 16px; }
.app-folha-caixa b { font-size: 1.15rem; }
.app-folha-caixa p { margin: 0; line-height: 1.5; color: #2b3a5c; }
.app-folha-nota { font-size: .85rem; color: #6B7090 !important; }
.app-tecla { display: inline-block; background: #F8F5EE; border-radius: 6px; padding: 0 6px; }
.app-folha-ok { margin-top: 6px; border: 0; border-radius: 12px; background: #087DBC; color: #fff; font: 800 1rem "Archivo", sans-serif; padding: 12px 22px; cursor: pointer; width: 100%; }
.app-folha-instalar { margin: 4px 0 10px; border: 0; border-radius: 12px; background: #FFD23F; color: #0A1B3D; font: 800 1rem "Archivo", sans-serif; padding: 12px 22px; cursor: pointer; width: 100%; }
.app-folha-instalar[hidden], .app-folha-passo[hidden], .app-folha-espera[hidden] { display: none; }
.app-folha-espera { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; }
.app-folha-espera::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 3px solid #E6E1D6; border-top-color: #087DBC; animation: app-gira .8s linear infinite; }
@keyframes app-gira { to { transform: rotate(360deg); } }
@media (min-width: 861px) { .app-folha { align-items: center; } }
