/* ==========================================================================
   Responsividade: Telas Médias, Tablets e Celulares (<960px)
   ========================================================================== */

.scrim {
  display: none;
}

@media (max-width: 960px) {
  /* barra da pasta apertada: o botao de enviar encolhe para so o icone */
  .toolbar-left .tb-enviar .rotulo {
    display: none;
  }
  .toolbar-left .tb-enviar {
    padding: 0.42rem 0.6rem;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(18rem, 85vw);
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-pop);
  }

  body[data-rail="open"] .rail {
    transform: none;
  }

  body[data-rail="open"] .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 90;
  }

  .burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--r-pill);
    color: var(--ink-mid);
    font-size: 18px;
    flex: none;
  }

  .burger:hover {
    background: var(--hover);
  }

  .head {
    padding: 0 0.85rem;
    gap: 0.5rem;
    /* bloco contentor da busca: sem isto ela ancorava mais acima e
       cobria o proprio cabecalho, tornando o hamburguer inclicavel */
    position: relative;
  }

  .nav-arrows {
    display: none;
  }

  .crumbs {
    max-width: none;
    flex: 1;
  }

  .crumb {
    font-size: 14px;
    max-width: 8rem;
  }

  .address-bar {
    max-width: none;
    flex: 1;
  }

  .search {
    position: absolute;
    left: 0;
    right: 0;
    /* 100% do .head, nao a altura nominal: ancora na borda de baixo
       do cabecalho real, seja qual for a posicao dele */
    top: 100%;
    padding: 0.5rem 0.85rem;
    max-width: none;
    background: var(--ground);
    border-bottom: 1px solid var(--line-soft);
    z-index: 15;
  }

  .workspace {
    padding-top: 3.2rem;
  }

  .user-badge {
    display: none;
  }

  .content {
    /* rolagem horizontal aqui, e nao num wrapper: um overflow no meio do
       caminho viraria o novo scrollport e o thead sticky pararia de grudar */
    overflow-x: auto;
    margin-left: 0;
    border-radius: 0;
    padding: 0.5rem 0.85rem 5rem;
  }

  .grade {
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 0.75rem;
  }

  .infopane {
    position: fixed;
    right: 0;
    top: var(--head);
    bottom: 0;
    width: min(20rem, 90vw);
    z-index: 80;
    box-shadow: var(--shadow-pop);
  }

  .tx {
    left: 0.85rem;
    right: 0.85rem;
    width: auto;
    bottom: 0.85rem;
  }

  .toasts {
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.85rem;
  }

  .toast {
    max-width: none;
  }

  .hide-sm {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rail, .infopane, .content {
    transition: none !important;
  }
}
