/* University of Melbourne Color Palette */
:root {
  --melbourne-blue: #00274D; /* Deep Blue (Primary) */
  --melbourne-light-blue: #1565C0; /* Bright Blue */
  --melbourne-bg-light: #E6F2FA; /* Soft Blue Background */
  --melbourne-gold: #F6BE00; /* Gold */
  --melbourne-dark-grey: #4D4D4F; /* Dark Grey */
  --melbourne-light-grey: #D6D6D6; /* Light Grey */
}

/* Exercise Styling */
.exercise {
  padding: 0.6em; /* Reduced padding */
  margin-bottom: 0.8em; /* Less space between exercises */
  border-left: 4px solid var(--melbourne-blue); /* Slightly thinner border */
  background-color: var(--melbourne-bg-light); /* Light Blue Background */
  position: relative;
  border-radius: 4px; /* Softer rounded corners */
  font-size: 0.9em; /* Smaller text */
}

/* Exercise Title */
.exercise::before {
  content: "Exercise";
  display: block;
  font-weight: bold;
  color: var(--melbourne-blue); /* Deep Blue */
  margin-bottom: 0.3em; /* Reduced spacing */
  font-size: 1em; /* Slightly smaller font */
}

/* Exercise Time Tag */
.exercise-time {
  position: absolute;
  top: 0.5em; /* Moved closer to top */
  right: 0.5em; /* Moved closer to right */
  background-color: var(--melbourne-gold); /* Gold */
  color: var(--melbourne-blue); /* Deep Blue */
  padding: 0.1em 0.4em; /* Smaller padding */
  border-radius: 3px;
  font-size: 0.75em; /* Smaller font */
  font-weight: bold;
}

/* Solution Box Styling */
.solution-header {
  cursor: pointer;
  padding: 0.4em 0.8em; /* Reduced padding */
  background-color: var(--melbourne-blue); /* Deep Blue */
  color: white;
  font-weight: bold;
  border-radius: 4px 4px 0 0; /* Less rounded */
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  font-size: 0.9em; /* Smaller font */
}

.solution-header::after {
  content: "▼";
  font-size: 0.8em;
  margin-left: 6px;
  transition: transform 0.3s;
}

.solution-header.collapsed::after {
  content: "▶";
}

/* Solution Content */
.solution-content {
  padding: 0.6em; /* Reduced padding */
  border: 1px solid var(--melbourne-blue);
  border-top: none;
  border-radius: 0 0 4px 4px; /* Softer corners */
  background-color: var(--melbourne-light-grey); /* Light Grey */
  margin-top: 0;
  margin-bottom: 0.8em; /* Less space below */
  font-size: 0.9em; /* Smaller text */
}

.solution-content.hidden {
  display: none;
}

/* Darker grey background for all code blocks */
pre, code {
  background-color: #E0E0E0 !important; /* Medium-light grey */
  border-radius: 4px; /* Smooth rounded edges */
  padding: 0.4em 0.6em;
  font-family: "Fira Code", monospace; /* Clean monospace font */
}

/* Inline code styling */
code {
  color: #7A8033; /* Mt William Greenstone */
  font-weight: bold;
  padding: 0.2em 0.4em;
  border-radius: 4px;
}

/* Code output background */
.output pre {
  background-color: #D6D6D6 !important; /* Slightly darker grey */
  border-left: 4px solid #7A8033; /* Mt William Greenstone border */
  padding: 0.6em;
  font-size: 0.9em;
}

/* Embedded code chunk styling */
.sourceCode pre {
  background-color: #E0E0E0 !important; /* Consistent darker grey */
  border-left: 4px solid #7A8033; /* Consistent with output */
  padding: 0.6em;
  font-size: 0.9em;
}

/* Reduce spacing between code blocks and text */
.sourceCode, .output {
  margin-bottom: 1em;
}

/* Improve spacing for inline code */
p code {
  background-color: #E0E0E0 !important; /* Darker grey */
  color: #00274D; /* Deep blue for readability */
  font-size: 0.9em;
}
