
/* Modernized KCML CSS with Fixed Sidebar and Heading Styles */
body {
  font-family: system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  background-color: #ffffff;
  color: #222;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row-reverse; /* Sidebar now appears on the left */
  align-items: flex-start;
}

/* Headings mapped from class names */
.h1 {
  font-size: 1.75rem;
  font-weight: bold;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}
.h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}
.h5 {
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

a {
  color: #0077cc;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

pre, .listing, .sqldef, .xmldef, .shelldef, .cdef, .outputdef, .apachedef, .confdef {
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.alert {
  background-color: #d9534f;
  color: white;
  padding: 1rem;
  border-left: 4px solid #b52b27;
  margin: 1rem 0;
}

.submit_input {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
}
.submit_input:hover {
  background-color: #e0e0e0;
}

table {
  border-collapse: collapse;
  width: 100%;
}
th, td {
  border-bottom: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}
tr:nth-child(even) {
  background-color: #f5f5f5;
}

/* Sidebar inserted by JS */
#sidebar {
  width: 280px;
  min-height: 100vh;
  background-color: #f9f9f9;
  padding: 1rem;
  box-shadow: 1px 0 5px rgba(0,0,0,0.1);
  overflow-y: auto;
}

/* Main content */
body > *:not(#sidebar) {
  flex: 1;
  padding: 1.5rem;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #ddd;
  }
  a { color: #82aaff; }
  pre {
    background-color: #1e1e1e;
    border-color: #444;
  }
  #sidebar {
    background-color: #1e1e1e;
  }
}
