.search-container {
  position: relative;
  width: 55%;
  margin: 10px 5%;
}

#searchInput {
  width: 100%;
  padding: 10px;
  padding-right: 30px; /* Make room for the icon */
  border: 1px solid #ddd;
  border-radius: 5px;
}

.search-icon {
  position: absolute;
  right: -35px; /* Adjust as necessary */
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #ddd; /* Dark color for visibility */
  font-size: 14px; /* You can adjust the size if needed */
  pointer-events: none; /* Make the icon non-clickable */
}

.container {
  display: flex;
  height: calc(100vh - 64px); /* Account for fixed topbar */
  margin-top: 64px; /* Push below fixed topbar */
}

.sidebar {
  width: 180px; /* Width when open */
  background-color: #2980b9;
  color: #ffffff;
  padding: 10px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(0);
  transition: transform 0.3s ease-in-out, width 0.3s ease-in-out;
  top: 0px;
}

/* Ensure nav doesn't create its own scrollbar */
.sidebar nav {
  overflow: visible;
  height: 100%;
}

.sidebar.hidden {
  width: 180px; /* Keep width when hidden */
  transform: translateX(calc(-100% + 24px)); /* Show 24px sliver like mobile */
}

/* Hide non-category items when sidebar is collapsed */
.sidebar.hidden .sidebar-separator,
.sidebar.hidden .sidebar-links,
.sidebar.hidden .sidebar-about {
  display: none;
}

/* Category title row: wrap title + chevron so chevron stays on the row only */
li.sublist-title {
  padding-right: 24px;
}

li.sublist-title > span.sublist-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 6px;
}

/* Chevron on the title row only (span), not the full dropdown */
li.sublist-title > span.sublist-title::after {
  content: '▾';
  flex-shrink: 0;
  display: inline-block;
  width: 1em;
  height: 1em;
  line-height: 1em;
  text-align: center;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

li.sublist-title.active > span.sublist-title::after {
  transform: rotate(180deg) translateX(1px);
}

.hide-arrows li.sublist-title > span.sublist-title::after {
  display: none;
}

/* Category title styling - smaller uppercase */
.sidebar-item.sublist-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e6f0fa;
  opacity: 0.85;
}

/* Tool names in sublists - normal size */
.sidebar nav ul ul li {
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  padding: 8px 10px;
}

.active-calculator {
  background-color: #729BB0;
  color: #f8f0e8;
}

.your-icon-class {
  width: 20px; /* Example width */
  height: 20px; /* Example height */
  margin-right: 5px; /* Space between icon and text */
  /* Add other styles as needed */
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

nav ul li {
  padding: 10px;
  border-radius: 5px;
  margin-top: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
  color: #f0e5d8;
}

nav ul li.sublist-title {
  margin-top: 2px;
  padding-top: 10px;
  padding-bottom: 10px;
}

nav ul li:hover {
  background-color: #729BB0;
  color: #f8f0e8;
}

.content {
  flex-grow: 1;
  padding: 0px 20px;
  overflow-y: auto;
  transition: width 0.3s ease-in-out;
  overflow-x: hidden; /* Prevent horizontal overflow */
  margin-top: 0px;
  width: calc(100% - 180px); /* Adjust width when sidebar is open */
}

.sidebar.hidden ~ .content {
  width: calc(100% - 24px); /* Account for 24px sliver when sidebar is hidden */
  margin-left: 24px;
}

/* Mobile: sidebar overlay with frosted glass effect */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    position: relative;
  }
  
  /* Sidebar: positioned below topbar */
  .sidebar {
    position: fixed;
    top: 64px; /* Below topbar (accounts for padding) */
    left: 0;
    bottom: 0;
    width: 260px;
    max-width: 75vw;
    z-index: 100;
    transform: translateX(calc(-100% + 24px)); /* Default: show 24px indicator */
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
  }
  
  /* Ensure nav doesn't create its own scrollbar on mobile */
  @media (max-width: 768px) {
    .sidebar nav {
      overflow: visible;
      height: 100%;
    }
  }
  
  /* Active/open state: fully visible */
  .sidebar.active {
    transform: translateX(0);
  }
  
  /* Content area: full width with left padding for indicator bar */
  .content {
    width: 100% !important;
    max-width: 100vw;
    padding: 20px 16px 20px 40px; /* 40px left for indicator bar */
    margin-left: 0;
    margin-top: 0;
    min-height: calc(100vh - 64px);
    box-sizing: border-box;
  }
  
  /* Frosted glass overlay when sidebar is open */
  .sidebar-overlay {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  
  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
  }
}

.hide-text {
  display: none;
}

/* Updated separator bar styles */
.separator-bar {
  list-style: none; /* Remove default list item styling */
  margin: 10px 0;
  border-bottom: 1px solid #2c3e50;
  padding: 0; /* Remove any padding */
  height: 0; /* Ensure no height other than the border */
}

.separator-bar.hidden {
  display: none;
}

/* Ensure the separator bar does not change color on hover */
.separator-bar:hover {
  background-color: transparent;
}

/* Welcome page inline icons */
.inline-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
  margin: 0 3px;
  line-height: 1;
  text-align: center;
}

.hamburger-inline {
  background: #2c3e50;
  color: #e6f0fa;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  padding-bottom: 2px; /* Shift icon up to center it visually */
}

.info-inline {
  background: #2980b9;
  color: white;
  border-radius: 50%;
  font-size: 10px;
}

/* Welcome content styling */
.welcome-content {
  max-width: none;
  margin: 0;
  padding-top: 0;
  text-align: left;
}

.welcome-content h2 {
  color: #2c3e50;
  margin-bottom: 16px;
  margin-top: 0;
}

.welcome-content p {
  color: #475569;
  line-height: 1.7;
  margin-bottom: 8px;
}

.welcome-content .recaptcha-notice {
  font-size: 12px;
  color: #8e9aaf;
}

/* Sidebar separator */
.sidebar-separator {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  margin: 16px 0;
}

/* Sidebar external links */
.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}

.sidebar-links li {
  padding: 10px 10px;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.sidebar-links li:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-links li a,
.sidebar-links li span {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 13px;
  display: block;
  width: 100%;
}

.sidebar-links li:hover a,
.sidebar-links li:hover span {
  color: #ffffff;
}

/* Sidebar about section */
.sidebar-about {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  margin-top: auto;
}

.about-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  flex-shrink: 0;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.about-name {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
}

.about-title,
.about-hospital {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.3;
}