/* Enhanced bc-style.css with tooltip, step output, and compact scrollable work sample */

.bc-container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  font-family: sans-serif;
  gap: 1.5em;
}

.bc-toggle {
  width: 100%;
  font-size: 0.85em;
  margin: 0.5em 0;
  cursor: pointer;
  color: #0073aa;
  text-decoration: underline;
}

.bc-sidebar {
  flex: 0 0 250px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 1em;
  font-size: 0.85em;
  line-height: 1.5;
  max-height: 1000px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.bc-sidebar.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border: none;
  overflow: hidden;
}

.bc-sidebar h3,
.bc-sidebar h4 {
  margin-top: 0.5em;
  font-size: 1em;
}

.bc-sidebar ul,
.bc-sidebar ol {
  margin: 0.5em 0 0 1.2em;
  padding: 0;
}

.bc-sidebar .sig {
  color: red;
}

.bc-sidebar .nosig {
  color: green;
}

.bc-wizard {
  flex: 1 1 700px;
  background: #fff;
  border: 1px solid #ddd;
  padding: 1.5em;
  box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

.bc-step {
  margin-bottom: 2em;
  padding: 1em;
  background: #fdfdfd;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
}

.bc-step h3 {
  margin-top: 0;
  font-size: 1.1em;
}

.bc-wizard label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5em;
}

.bc-wizard select,
.bc-wizard input[type="number"],
.bc-wizard input[type="range"],
.bc-wizard textarea {
  width: 100%;
  max-width: 100%;
  margin-bottom: 1em;
  padding: 0.4em;
  font-size: 0.95em;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.bc-wizard input[type="range"] {
  padding: 0;
  height: auto;
}

#bc-temp-val {
  display: inline-block;
  margin-left: 0.5em;
  font-weight: bold;
}

.bc-preview {
  white-space: pre-wrap;
  margin-bottom: 1em;
  padding: 1em;
  font-size: 0.85em;
  border-radius: 4px;
  background: #f4f4f4;
  border-left: 5px solid #999;
  max-height: 180px;
  overflow-y: auto;
}

.bc-preview.blue {
  background: #f0f9ff;
  border-left-color: #3b82f6;
}

.bc-preview.red {
  background: #fef2f2;
  border-left-color: #13da31; /* Note: This color was green, might be a typo for red? #ef4444 might be red */
}

.bc-summary {
  font-size: 0.9em;
  margin-bottom: 1.5em;
}

#bc-submit {
  background: #0073aa;
  color: white;
  padding: 0.6em 1.2em;
  font-size: 1em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#bc-submit:hover {
  background: #005f8d;
}

#bc-results {
  margin-top: 2em;
  font-size: 0.95em;
}

canvas#bc-chart {
  max-width: 100%;
  margin-top: 1em;
}

#bc-steps-info:empty,
#bc-raw-output:empty,
#bc-chart:empty {
  display: none;
}

#bc-steps-info,
#bc-raw-output {
  background: #fefefe;
  border: 1px solid #ddd;
  padding: 1em;
  margin-top: 1em;
  font-size: 0.9em;
  line-height: 1.6;
  border-radius: 4px;
}

#bc-results h4,
#bc-raw-output h4 {
  margin-top: 0;
  font-size: 1.1em;
}

/* Scrollable work sample area */
#bc-standardPassage {
  max-height: 120px;
  overflow-y: auto;
  background: #f8f8f8;
  padding: 0.75em;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9em;
  line-height: 1.4;
  margin-bottom: 1em;
}

.bc-preview pre {
  margin: 0;
  white-space: pre-wrap; /* allows wrapping inside <pre> */
  word-break: break-word;
}

/* --- Tooltip Styles --- */
.bc-tooltip-trigger {
  position: relative;
  display: inline-block;
  cursor: help;
  margin-left: 4px; /* Optional: adds a small space before the icon */
  color: #0073aa; /* WordPress blue for the icon */
  font-weight: bold;
}

.bc-tooltip-trigger .bc-tooltip-content {
  visibility: hidden;
  width: 250px; /* Adjust width as needed */
  background-color: #333; /* Dark background */
  color: #fff; /* Light text */
  text-align: left;
  border-radius: 4px;
  padding: 10px;
  position: absolute;
  z-index: 101; /* Ensure it's above other elements */
  bottom: 135%; /* Position above the trigger */
  left: 50%;
  transform: translateX(-50%); /* Better centering */
  opacity: 0;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
  font-size: 0.85em; /* Smaller font for tooltip */
  line-height: 1.4;
  font-weight: normal; /* Reset font-weight from trigger */
  white-space: pre-line; /* Respect newlines in the tooltip text */
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Arrow for the tooltip */
.bc-tooltip-trigger .bc-tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%; /* At the bottom of the tooltip */
  left: 50%;
  margin-left: -5px; /* Half of the arrow's width */
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent; /* Arrow color matches tooltip bg */
}

.bc-tooltip-trigger:hover .bc-tooltip-content,
.bc-tooltip-trigger:focus .bc-tooltip-content,
.bc-tooltip-trigger:focus-within .bc-tooltip-content { /* Added :focus and :focus-within for accessibility */
  visibility: visible;
  opacity: 1;
}