* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    height: 100vh;
    display: flex;
}

#sidebar {
  width: 300px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #ccc;
  padding: 10px;
  box-sizing: border-box;
  background: #fff;

  /* Mobile animation */
  transition: transform 0.3s ease;
}

#sidebar h2 a {
    font-size: 0.6em;   /* 60% of the h2 size */
    margin-left: 8px;   /* spacing between links */
    text-decoration: none; /* optional: remove underline */
    color: #007bff;        /* optional: link color */
}

#sidebar h2 a:hover {
    text-decoration: underline; /* optional hover effect */
}

.search-wrapper {
  position: relative;
}

#search {
  width: 100%;
  padding: 8px 36px 8px 8px; /* right padding for X */
  margin-bottom: 10px;
  font-size: 14px;
}

#clearSearch {
  position: absolute;
  top: 40%;
  right: 8px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #888;
  display: none;
}

#clearSearch:hover {
  color: #000;
}


/* Make the links scrollable */
#links {
  flex: 1;               /* take remaining space */
  overflow-y: auto;      /* scroll only this part */
  margin: 10px 0;        /* spacing */
  padding-left: 0;
  list-style: none;
}

#links li {
    margin-bottom: 6px;
}

#links a {
    text-decoration: none;
    color: #005eb8;
    font-size: 14px;
    cursor: pointer;
}

#links a:hover {
    text-decoration: underline;
}

#content {
    flex: 1;
    height: 100vh;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Make notice always at bottom */
#notice {
  flex-shrink: 0;
  font-size: 12px;
  color: #666;
  margin-top: 10px;
}



/* === Floating toggle button === */
#sidebarToggle {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 1100;
  padding: 12px 14px;
  font-size: 18px;
  border-radius: 50%;
  border: none;
  background: #007bff;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* === Mobile collapse behaviour === */
@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    z-index: 1000;
  }

  #sidebar.open {
    transform: translateX(0);
  }

  #sidebarToggle {
    display: block;
  }
}