/* Sidebar collapse styles */

/* Collapsed sidebar state */
aside.collapsed {
  width: 4.7rem !important; /* 64px - icon only width */
}

/* Adjust main content margin when sidebar is collapsed */
main.sidebar-collapsed {
  margin-left: 4.7rem !important; /* Match collapsed sidebar width */
}

/* Smooth transitions for sidebar and content */
aside, main {
  transition: all 0.3s ease-in-out;
}

/* Hide overflow when collapsing to prevent text spillover */
aside.collapsed nav {
  overflow-x: visible;
  overflow-y: auto;
}

/* Center icons when sidebar is collapsed */
aside.collapsed nav a,
aside.collapsed nav button {
  justify-content: center;
}

/* Ensure smooth rotation for collapse icon */
button[data-sidebar-target="icon"] {
  transition: transform 0.3s ease-in-out;
}

/* Hide text in collapsed state (but allow hover to show) */
.sidebar-text-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Hover tooltip for collapsed sidebar items */
aside.collapsed nav a,
aside.collapsed nav > div a,
aside.collapsed > div a {
  position: relative;
  overflow: visible !important;
}

/* Tooltip wrapper - creates a hover-activated tooltip ONLY for text labels */
aside.collapsed nav a:hover span.sidebar-text-hidden.flex-1,
aside.collapsed nav > div a:hover span.sidebar-text-hidden.flex-1,
aside.collapsed > div a:hover span.sidebar-text-hidden.flex-1 {
  /* Override the hidden positioning */
  position: fixed;
  width: auto;
  height: auto;
  padding: 0.5rem 0.75rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  border-width: 1px;
  
  /* Tooltip styling */
  background-color: hsl(var(--card));
  color: hsl(var(--foreground));
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--border));
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  z-index: 9999;
  pointer-events: none;
  animation: tooltipFadeIn 0.15s ease-out;
  
  /* Position to the right of the sidebar */
  left: 5rem !important;
  margin-left: 0;
}

/* Keep other sidebar-text-hidden elements (badges, arrows) truly hidden on hover */
aside.collapsed nav a:hover span.sidebar-text-hidden:not(.flex-1),
aside.collapsed nav > div a:hover span.sidebar-text-hidden:not(.flex-1),
aside.collapsed > div a:hover span.sidebar-text-hidden:not(.flex-1) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Fade in animation for tooltip */
@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
