/* Custom styling for numerical examples */

/* Counter for numerical examples - reset at each chapter */
body {
  counter-reset: example-counter;
}

section[id^="sec-"],
section.level1 {
  counter-reset: example-counter;
}

/* Style for numerical example callouts */
div.callout-example {
  border: 2px solid #3498db;
  background-color: #ebf5fb;
  border-radius: 8px;
  padding: 1em;
  margin: 1em 0;
  counter-increment: example-counter;
  position: relative;
  padding-top: 3em;
}

/* Create header from title attribute */
div.callout-example::before {
  content: "Example " counter(example-counter) ": " attr(title);
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background-color: #3498db;
  color: white;
  font-weight: bold;
  font-size: 0.85em;
  padding: 0.5em 1em;
  border-radius: 6px 6px 0 0;
}

div.callout-example .callout-body {
  padding: 0.5em 0;
}

/* Custom styling for real-world connection callouts */
div.callout-realworld {
  border: 2px solid #27ae60;
  background-color: #eafaf1;
  border-radius: 8px;
  padding: 1em;
  margin: 1em 0;
  border-left: 5px solid #27ae60;
}

/* Add "In Practice:" prefix */
div.callout-realworld::before {
  content: "🌍 In Practice: ";
  display: block;
  color: #27ae60;
  font-weight: bold;
  font-size: 0.9em;
  margin-bottom: 0.5em;
}

div.callout-realworld .callout-body {
  padding: 0;
}

/* Highlight box for key formulas */
.formula-highlight {
  background-color: #fff3cd;
  padding: 2px 6px;
  border-radius: 3px;
  border-left: 3px solid #ffc107;
  display: inline-block;
  margin: 0 2px;
}

/* Custom styling for "Check Your Work" self-assessment callouts */
div.callout-checkyourwork {
  border: 2px solid #e67e22;
  background-color: #fef5e7;
  border-radius: 8px;
  padding: 1em;
  margin: 1.5em 0;
  border-left: 5px solid #e67e22;
}

/* Add "✓ Check Your Work:" prefix */
div.callout-checkyourwork::before {
  content: "✓ Check Your Work";
  display: block;
  color: #e67e22;
  font-weight: bold;
  font-size: 1.0em;
  margin-bottom: 0.75em;
}

div.callout-checkyourwork .callout-body {
  padding: 0;
}

/* Style the "Can't answer confidently?" text */
div.callout-checkyourwork strong {
  color: #d35400;
}