/* Side Panel Styles */
#side-panel {
  position: fixed;
  top: 0;
  right: -100%; /* Start hidden off-screen */
  width: 450px;
  height: 100%;
  background-color: var(--body-bg, #fff);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1001; /* Above most elements */
  transition: right 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

#side-panel.open {
  right: 0;
}

#side-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

#side-panel-overlay.open {
  display: block;
  opacity: 1;
}

#side-panel section {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#side-panel header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--hairline-color, #eee);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--primary, #417690);
  color: #fff;
}

#side-panel header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #fff;
}

#side-panel #close-side-panel {
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

#side-panel-content {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
}

#side-panel #success-message,
#side-panel #error-message {
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 4px;
}

#side-panel #success-message:not(:empty) {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

#side-panel #error-message:not(:empty) {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Dark mode adjustments if needed */
body.dark-mode #side-panel {
  background-color: var(--body-bg, #121212);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
}
