/* 2026-11-30 mobile fix for www app pages. Phone widths only; desktop untouched.
   Footer rules skip Matches (body.matches-page-simple), which stays as it was. */
/* Phone header: search + menu buttons. iOS Safari / Telegram in-app paint
   unstyled <button> as a light native square, so reset appearance and give
   them the anthracite + gold look of the account circle (44px). */
@media (max-width:720px){
  html body #sv-topbar .mobile-search-trigger,
  html body #sv-topbar .topbar-menu-trigger{
    -webkit-appearance:none!important;
    appearance:none!important;
    box-sizing:border-box!important;
    display:grid!important;
    place-items:center!important;
    width:44px!important;min-width:44px!important;max-width:44px!important;
    height:44px!important;min-height:44px!important;max-height:44px!important;
    flex:0 0 44px!important;
    padding:0!important;
    border:1px solid rgba(212,175,55,.28)!important;
    border-radius:12px!important;
    background:#110F0C!important;
    background-image:none!important;
    color:#F1E4B7!important;
    box-shadow:none!important;
    text-shadow:none!important;
    line-height:1!important;
    -webkit-tap-highlight-color:transparent;
    cursor:pointer;
  }
  html body #sv-topbar .mobile-search-trigger:active,
  html body #sv-topbar .topbar-menu-trigger:active{
    background:#1C1915!important;
    border-color:rgba(212,175,55,.5)!important;
  }
  html body #sv-topbar .mobile-search-trigger > [data-gg-unified-icon],
  html body #sv-topbar .topbar-menu-trigger > [data-gg-unified-icon]{
    display:inline-flex!important;align-items:center;justify-content:center;
    width:20px;height:20px;color:inherit!important;
  }
  html body #sv-topbar .mobile-search-trigger svg,
  html body #sv-topbar .topbar-menu-trigger svg{
    width:20px!important;height:20px!important;display:block;
    color:inherit!important;stroke:currentColor;
  }
}

/* Hide the native search clear "x" (blue on iOS); the panel has its own close. */
@media (max-width:720px){
  html body #sv-topbar input[type="search"]::-webkit-search-cancel-button,
  html body #sv-topbar input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;appearance:none;display:none}
}

/* Phone search on www app pages: the shared header CSS (sv-header.css)
   forced the search shell to display:none and 280px wide even after tapping
   search, so the existing full-screen search panel never showed. Let it open. */
@media (max-width:720px){
  html body.gg-layout-shell #sv-topbar#sv-topbar .topbar-search-shell.is-mobile-open.is-mobile-open{
    display:flex!important;
    flex-direction:column!important;
    position:fixed!important;
    inset:0!important;top:0!important;left:0!important;right:0!important;bottom:0!important;
    width:100vw!important;min-width:0!important;max-width:none!important;
    height:100dvh!important;min-height:0!important;max-height:none!important;
    flex:none!important;
    transform:none!important;
    z-index:10050!important;
    overflow:hidden!important;
  }
  html body.gg-layout-shell #sv-topbar#sv-topbar .topbar-search-shell.is-mobile-open.is-mobile-open .topbar-search-form{
    width:100%!important;min-width:0!important;max-width:none!important;
    flex:1 1 auto!important;
    height:auto!important;max-height:none!important;
  }
  html body.gg-layout-shell #sv-topbar#sv-topbar .topbar-search-shell.is-mobile-open.is-mobile-open .topbar-search-form input{
    width:100%!important;min-width:0!important;max-width:none!important;
    height:50px!important;min-height:50px!important;max-height:50px!important;
    font-size:16px!important;
  }
  /* Panel close button sat over the field's top edge. */
  html body.gg-layout-shell #sv-topbar#sv-topbar .topbar-search-shell.is-mobile-open.is-mobile-open .mobile-search-close{
    top:calc(4px + env(safe-area-inset-top,0px))!important;
    width:36px!important;height:36px!important;
  }
}

@media (max-width:720px){
  /* Base lines inside the page gutter (were flush to the screen edge). */
  body:not(.matches-page-simple) #site-trust-footer .foot-base{padding:10px 16px 0}
  /* Company + Legal side by side; Social media as one compact row under them. */
  body:not(.matches-page-simple) #site-trust-footer .foot-in{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 20px}
  body:not(.matches-page-simple) #site-trust-footer .foot-in > :nth-child(4){grid-column:1 / -1;display:flex;flex-wrap:wrap;column-gap:24px}
  body:not(.matches-page-simple) #site-trust-footer .foot-in > :nth-child(4) .fh{flex-basis:100%}
  /* Bottom-nav space is reserved once, on body (nav height incl. safe area).
     The pre-footer placeholder and the footer's own nav padding doubled it
     and left an empty band under the 18+ line. */
  html body.gg-layout-shell:not(.matches-page-simple):has(> #site-trust-footer)::after{display:none!important}
  html body:not(.matches-page-simple):has(> #site-trust-footer):has(> .bottom-nav){
    padding-bottom:var(--gg-public-nav-h,calc(68px + env(safe-area-inset-bottom,0px)))!important;
  }
  html body.gg-layout-shell:not(.matches-page-simple):has(> .bottom-nav) #site-trust-footer .foot{padding-bottom:16px!important}
  /* Shorter 18+ band and wordmark so, at scroll-end, the 18+ band and the
     whole footer fit between the header and the bottom nav. */
  body:not(.matches-page-simple) #site-trust-footer .rg{padding:16px 0}
  body:not(.matches-page-simple) #site-trust-footer .foot{padding-top:14px}
  body:not(.matches-page-simple) #site-trust-footer .foot-in > :nth-child(4) .fh{margin-bottom:6px}
  body:not(.matches-page-simple) #site-trust-footer .wordmark{font-size:30px;margin:8px 0 0}
  body:not(.matches-page-simple) #site-trust-footer .foot-base{margin-top:12px}
}
