img.logo {
  width: 400px;   /* increase size */
  height: auto;   /* keep proportions */
}

[data-panel]:has(iframe.side-pdf) {
  min-width: 35vw;        /* 35% della larghezza del viewport */
  /* opzionale: limita e rendi responsive */
  max-width: 60vw;
}

/* Sidebar width come percentuale della pagina */
.group[data-variant="sidebar"] {
  --sidebar-width: clamp(220px, 22vw, 360px);
  --sidebar-width-icon: 3rem;
}

span[data-state="closed"]:has(> img[alt="Avatar for EvoBOT"]) {
  width: 32px;
  height: 32px;
}

/* Sidebar: mostra il pulsante "Nuova Chat" sopra i gruppi e con etichetta */
[data-sidebar="content"] {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Consenti il resize in larghezza evitando min-content sui figli */
[data-sidebar="group"],
[data-sidebar="menu"],
[data-sidebar="menu-item"],
[data-sidebar="menu-button"],
#thread-history {
  min-width: 0;
}

/* Evita blocchi di larghezza sul contenitore sidebar */
[data-sidebar="sidebar"],
aside[data-sidebar] {
  min-width: 0;
  max-width: none;
  flex: 0 1 auto;
}

[data-sidebar="content"] > div:has(> #new-chat-button) {
  order: -1;
  margin: 0 0 0.5rem 0;
  padding: 0 0.5rem;
  min-width: 0;
}

/* Quando la sidebar è collassata in modalità icona */
[data-collapsible="icon"] #new-chat-button {
  width: 2rem;
  min-width: 2rem;
  padding: 0;
  justify-content: center;
}

[data-collapsible="icon"] #new-chat-button::after {
  content: "";
}

[data-collapsible="icon"] [data-sidebar="content"] > div:has(> #new-chat-button) {
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
}

#new-chat-button {
  width: 100%;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0 0.75rem;
  height: 2.25rem; /* match h-9 */
  min-width: 0;
  overflow: hidden;
}

#new-chat-button::after {
  content: "Nuova Chat";
  font-size: 0.875rem;
  line-height: 1;
  color: hsl(var(--muted-foreground));
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
