/* Navigation sidebar styles now loaded from shared-sidebar.css */
/* This file only contains LibreChat-specific overrides */

/* Offset LibreChat main content for the shared sidebar */
#__next > div,
[role="presentation"],
main {
  transition: margin-right 0.3s ease;
}

/* ===== Popovers / dropdowns ABOVE the shared sidebar =====
 * The shared sidebar uses z-index: 90 (set in shared-sidebar.css).
 * LibreChat uses Ariakit, which renders popovers (model picker, agent picker,
 * MCP tools, etc.) inside a portal div with id="portal/:rN:". The actual
 * popover wrapper inside that portal carries an inline `z-index: 40`,
 * which is BELOW the sidebar -> the right edge of the dropdown gets hidden
 * behind the sidebar.
 * We push every popover that lives inside an Ariakit portal clearly above
 * the sidebar so dropdowns stay fully visible.
 */
div[id^="portal/"] > div {
  z-index: 200 !important;
}

/* Same safety net for any Radix-UI based popover */
[data-radix-popper-content-wrapper],
[data-radix-select-content],
[data-radix-dropdown-menu-content] {
  z-index: 200 !important;
}

/* ===== Mobile floating toggle of the shared sidebar =====
 * ב-shared-sidebar.css יש `.sidebar-mobile-toggle` עם `position: fixed;
 * bottom: 1.5rem; right: 1.5rem;`. ב-LibreChat ה-form של כתיבת ההודעה
 * יושב בתחתית המסך עם כפתורי שליחה/פעולות, כך שהלחצן הצף בפינה הימנית-
 * תחתונה היה מכסה אותם. במקום זה אנחנו מעבירים אותו לפינה השמאלית-
 * עליונה של המסך ב-LibreChat בלבד. ה-`top/left` מתחילים, ו-`bottom/right`
 * מנוטרלים ל-`auto` כדי לעקוף את המקור ב-shared-sidebar.css. */
@media (max-width: 768px) {
  .sidebar-mobile-toggle {
    top: 1rem !important;
    left: 1rem !important;
    bottom: auto !important;
    right: auto !important;
  }
}
