/* Barra in alto: i pulsanti non escono piu' dal bordo destro sugli schermi sotto i 1920px (1366, 1440, 1536, 1600...).
   Prima il passaggio a "solo icona" avveniva troppo tardi (soglie di desktop.css); qui scatta quando lo spazio non basta davvero.
   Con la barra stretta restano solo le icone (il nome compare passandoci sopra), con pochissimo spazio le icone si stringono.
   Sui 3440px (ultra wide) non cambia nulla: la barra resta con i nomi. Per toglierlo basta togliere il <link> da index.html. */
@media (width >= 1000px) and (hover: hover) and (pointer: fine) {
  @container barra (width < 2360px) {
    .map-topbar .map-actions .button:not(.xf-chip) > span { display: none !important; }
    .map-topbar .map-actions .button:not(.xf-chip) > em { display: none !important; }
    .map-topbar .map-actions .button:not(.xf-chip) { width: 40px !important; min-width: 40px !important; padding: 0 !important; justify-content: center; }
    .map-topbar .map-actions .button:hover::after, .map-topbar .map-actions .button:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
  }
  @container barra (width < 1080px) {
    .map-topbar .map-actions .xf-chip > span { display: none !important; }
    .map-topbar .map-actions .xf-chip { width: 40px !important; min-width: 40px !important; padding: 0 !important; justify-content: center; }
  }
  @container barra (width < 1000px) {
    .map-topbar .map-actions { width: 100%; gap: 3px; }
    .map-topbar .map-actions .button:not(.xf-chip), .map-topbar .map-actions .xf-chip, .map-topbar .map-actions .icon-button {
      flex: 1 1 0 !important; min-width: 0 !important; width: auto !important; max-width: 40px;
      padding: 0 !important; min-height: 36px !important; height: 36px;
    }
    .map-topbar .map-actions .button > svg { width: 16px; height: 16px; }
  }
}
/* Schermi molto larghi ma con la barra stretta (es. 2560px con pannelli aperti): solo icone */
@media (width >= 2400px) and (hover: hover) and (pointer: fine) {
  @container barra (width < 2360px) {
    .map-topbar .map-actions .button > span, .map-topbar .map-actions .button > em { display: none !important; }
    .map-topbar .map-actions .button, .map-topbar .map-actions [data-dk-sec] { width: 46px !important; min-width: 46px !important; padding: 0 !important; justify-content: center; }
    .map-topbar .map-actions .button:hover::after, .map-topbar .map-actions .button:focus-visible::after { display: block; opacity: 1; transform: translate(-50%, 0); }
  }
}
