/* =====================================================================
   VibeCall no celular: layout próprio para telas pequenas (até 760 px).
   Barra de navegação embaixo, janelas que sobem de baixo, loja em tela cheia.
   No PC nada daqui vale.
   ===================================================================== */
.bottom-nav { display: none; }

@media (max-width: 760px) {
  :root { --bn-h: 60px; }

  /* ---------- barra de navegação de baixo ---------- */
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: #111214; border-top: 1px solid rgba(255, 255, 255, .08); }
  .bottom-nav.hidden { display: none; }
  .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 2px 4px; border-radius: 0; background: none; color: var(--muted, #949ba4); font-size: 11px; font-weight: 700; letter-spacing: .01em; position: relative; -webkit-tap-highlight-color: transparent; }
  .bottom-nav button .ico { width: 24px; height: 24px; }
  .bottom-nav button.on { color: #fff; }
  .bottom-nav button.on::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand, #5865f2); }
  .bottom-nav button.on .ico { color: var(--brand, #5865f2); }
  .bottom-nav .bn-badge { position: absolute; top: 5px; left: calc(50% + 8px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #f23f43; color: #fff; font-size: 10px; display: grid; place-items: center; }
  /* a tela do app ganha o espaço da barra */
  body.has-bnav .app { height: calc(100dvh - var(--bn-h) - env(safe-area-inset-bottom, 0px)); }
  /* com o teclado aberto, na chamada ou com janela aberta a barra some e a tela volta a ocupar tudo */
  body:has(input:focus, textarea:focus) .bottom-nav, body:has(.app.in-voice) .bottom-nav { display: none; }
  body:has(input:focus, textarea:focus) .app, body:has(.app.in-voice) .app { height: 100dvh !important; }

  /* ---------- toques fáceis: alvos de pelo menos 44 px ---------- */
  .icon-btn { min-width: 44px; min-height: 44px; }
  .rail-item { width: 56px; height: 56px; }
  .chan, .dm-item, .friend-row, .member { min-height: 48px; }
  .btn-primary, .btn-ghost { min-height: 44px; }
  .composer { margin: 0 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .composer textarea, .composer input { font-size: 16px; }
  .messages { padding-bottom: 8px; }

  /* ---------- janelas viram painéis que sobem de baixo ---------- */
  .modal:not(#dialog):not(#picker):not(#shopModal) { align-items: flex-end; padding: 0; }
  .modal:not(#dialog):not(#picker):not(#shopModal) .modal-card { width: 100%; max-width: none; border-radius: 20px 20px 0 0; max-height: 92dvh; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); animation: bn-sheet .24s cubic-bezier(.2, .9, .3, 1) both; }
  .modal:not(#dialog):not(#picker):not(#shopModal) .modal-card::before { content: ''; display: block; width: 42px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .22); margin: -6px auto 6px; flex: none; }
  @keyframes bn-sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

  /* =====================================================================
     LOJA NO CELULAR: tela cheia, abas e tópicos fixos no topo, 2 itens por linha,
     prévia numa gaveta de baixo e carrinho sempre à vista
     ===================================================================== */
  #shopModal { padding: 0; align-items: stretch; }
  #shopModal .shop-card { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; background: var(--bg-main, #313338); }
  .shop-hero { padding: 14px 14px 12px; align-items: center; gap: 10px; }
  .shop-hero .shop-pill { display: none; }
  .shop-hero h2 { font-size: 20px; margin: 0; }
  .shop-hero p { display: none; }
  .shop-hero .icon-btn { background: rgba(0, 0, 0, .28); border-radius: 50%; }
  .shop-plans-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 12px 0; padding: 12px; width: calc(100% - 24px); border-radius: 12px; background: linear-gradient(120deg, rgba(124, 58, 237, .35), rgba(219, 39, 119, .3)); border: 1px solid rgba(255, 255, 255, .22); color: #fff; font-weight: 800; font-size: 14px; }
  .shop-plans-toggle .chev { transition: transform .2s; }
  .shop-card.plans-open .shop-plans-toggle .chev { transform: rotate(180deg); }
  .shop-card:not(.plans-open) #turboCard, .shop-card:not(.plans-open) #vipCard { display: none; }
  .turbo-card { margin: 10px 12px 0; padding: 14px; }
  .turbo-card ul { display: none; } /* a lista longa de vantagens fica de fora: os preços e o destaque bastam */
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-btn { min-height: 62px; }

  .shop-tabs { position: sticky; top: 0; z-index: 6; margin: 8px 0 0; padding: 8px 10px; gap: 6px; background: var(--bg-main, #313338); border-bottom: 1px solid rgba(255, 255, 255, .06); display: flex; overflow-x: auto; scrollbar-width: none; }
  .shop-tabs::-webkit-scrollbar { display: none; }
  .shop-tabs .tab { flex: 1 0 auto; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; border-radius: 12px; font-size: 14px; font-weight: 800; background: rgba(255, 255, 255, .06); white-space: nowrap; }
  .shop-tabs .tab.active { background: var(--brand, #5865f2); color: #fff; }

  .shop-body { flex-direction: column; align-items: stretch; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px 10px 96px; }
  .shop-card.sheet-open .shop-grid { padding-bottom: calc(52dvh + 70px); }
  .shop-grid > .shop-topics { grid-column: 1 / -1; position: sticky; top: 61px; z-index: 5; margin: 0 -10px; padding: 8px 10px; background: var(--bg-main, #313338); display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; scrollbar-width: none; }
  .shop-grid > .shop-topics::-webkit-scrollbar { display: none; }
  .shop-topic { flex: none; min-height: 38px; padding: 0 14px; border-radius: 19px; font-size: 13px; font-weight: 800; white-space: nowrap; }
  .shop-buyinfo { display: block; font-size: 12.5px; padding: 9px 12px; line-height: 1.5; }
  .shop-buyinfo .ico-wrap, .shop-buyinfo .ico { display: none; }
  .shop-buyinfo b, .shop-buyinfo strong { white-space: nowrap; }
  .shop-sec, .shop-sub { grid-column: 1 / -1; }
  .shop-item { border-radius: 14px; }
  .shop-item .show { height: 118px; }
  .shop-item .show .avatar { width: 62px; height: 62px; }
  .shop-item .info { padding: 9px 10px 11px; gap: 7px; }
  .shop-item .info strong { font-size: 14px; line-height: 1.2; }
  .shop-item .row { flex-wrap: wrap; gap: 4px; font-size: 12px; }
  .shop-item .btn-primary, .shop-buy { width: 100%; min-height: 40px; font-size: 13px; }

  /* prévia: gaveta que sobe de baixo quando se toca num item */
  .shop-preview { position: fixed; top: auto; left: 0; right: 0; bottom: var(--cart-h, 0px); z-index: 7; width: auto; max-height: 52dvh; overflow-y: auto; padding: 8px 14px calc(14px + env(safe-area-inset-bottom, 0px)); background: #111214; border-radius: 20px 20px 0 0; box-shadow: 0 -14px 34px rgba(0, 0, 0, .55); transform: translateY(115%); transition: transform .26s cubic-bezier(.2, .9, .3, 1); }
  .shop-card.sheet-open .shop-preview { transform: none; }
  .shop-preview label { text-align: center; }
  .shop-prev-x { position: absolute; top: 6px; right: 10px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 18px; display: grid; place-items: center; z-index: 2; }
  .shop-preview .profile-card { max-width: 340px; margin: 0 auto; }

  .shop-cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; margin: 0; border-radius: 16px 16px 0 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .shop-cartbar .btn-primary { min-height: 46px; }

  /* página "Você": tela inteira (a barra de baixo continua à vista, com o botão aceso) */
  .status-menu.me-pop, .status-menu.me-pop.profile-card { position: fixed; left: 0 !important; right: 0; top: 0; bottom: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; max-height: none; height: auto; border-radius: 0; box-shadow: none; z-index: 44; overflow: hidden auto; transform-origin: 50% 100%; }
  .status-menu.me-pop .pc-banner { height: 130px; }
  .status-menu.me-pop .pc-avatar { margin-top: -48px; }
  .status-menu.me-pop button, .status-menu.me-pop .mp-row { min-height: 52px; font-size: 15px; }

  /* ---------- listas e conversas ---------- */
  .call-strip { margin: 6px 8px 0; }
}

@media (max-width: 760px) {
  /* servidores e conversas (que ficam fixos na tela) terminam em cima da barra de baixo */
  body.has-bnav:not(:has(input:focus, textarea:focus, .app.in-voice)) .rail,
  body.has-bnav:not(:has(input:focus, textarea:focus, .app.in-voice)) .sidebar { bottom: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px)); height: auto; }
  .userbar { min-height: 56px; }
}

@media (max-width: 760px) {
  /* os blocos da loja não encolhem (as abas e os planos estavam sendo espremidos); quem rola é a janela inteira */
  #shopModal .shop-card > * { flex-shrink: 0; }
  #shopModal .shop-body { flex: 1 0 auto; }
}
