.toolbox {
  width: 100%;
  max-width: 760px;          /* match your content width */
  height: auto;
  margin: 2rem auto;
  padding: 1.5rem;

  border-radius: 10px;
  background: #E6F2FF;
  border: 2px solid #003366;

  box-shadow: 0 4px 12px rgba(0,0,0,0.05);

  font-family: inherit;
  font-weight: inherit;
}

/* Header */
.toolbox-header {
  margin-bottom: 1rem;
}

.toolbox-title {
  margin: 0;
  text-align: center;
}

.toolbox-subtitle {
  margin: 0;
  text-align: center;
}

/* Content */
.toolbox-content {
  line-height: 1.6;
}

/* Interactive area */
.interactive-area {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #ddd;
}

.graph-canvas {
  width: 100%;       /* fill the toolbox width */
  max-width: 100%;
  height: 250px;     /* fixed height */
  border: 1px solid #ccc;
  border-radius: 8px;
}

/* =========================================
   Componentes do Laboratório Virtual - by zé 16/04/2026
   ========================================= */

/* Painel principal de controles */
.jsbox-control-panel {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.jsbox-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.jsbox-col-title {
  font-weight: bold;
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
  margin-bottom: 10px;
}
.jsbox-col-title.sys { color: #007bff; }
.jsbox-col-title.p1 { color: #28a745; }
.jsbox-col-title.p2 { color: #dc3545; }
.jsbox-col-title.opt { color: #17a2b8; }

/* Inputs e Labels */
.jsbox-input-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.jsbox-input-row label {
  margin: 0;
  font-weight: 500;
}

.jsbox-input {
  width: 50%;
  padding: 4px;
  border: 1px solid #ced4da;
  border-radius: 4px;
}

/* Botões Customizados */
.jsbox-btn {
  padding: 8px 15px;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.2s;
}
.jsbox-btn:hover { opacity: 0.85; }
.jsbox-btn-primary { background-color: #007bff; color: white; }
.jsbox-btn-success { background-color: #28a745; color: white; width: auto; }

/* Layout da Visualização (Canvas + Gráficos) */
.jsbox-vis-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.jsbox-vis-left { flex: 1; min-width: 300px; max-width: 450px; }
.jsbox-vis-right { flex: 1.5; min-width: 300px; display: flex; flex-direction: column; gap: 10px; }
.jsbox-charts-row { display: flex; gap: 10px; flex-wrap: wrap; }
.jsbox-charts-col { flex: 1; min-width: 250px; }

/* Cards (Para destacar Canvas e Gráficos) */
.jsbox-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  overflow: hidden;
  height: 100%;
}

.jsbox-card-header {
  background: #343a40;
  color: white;
  padding: 8px;
  text-align: center;
  font-weight: bold;
}

.jsbox-card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.jsbox-card-title {
  text-align: center;
  font-weight: bold;
  color: #6c757d;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

/* Canvas interno */
.jsbox-canvas-container {
  width: 100%;
  aspect-ratio: 1/1;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}

/* Gráficos */
.jsbox-chart {
  width: 100%;
  background: #fff;
  border-radius: 4px;
}

/* Status */
.jsbox-alert {
  background: #e2e3e5;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  font-weight: bold;
  margin-bottom: 15px;
}

/* Ajustes do Player */
.jsbox-player-bar {
  display: flex;
  width: 100%;
  gap: 15px;
  margin-bottom: 15px;
  align-items: center;
}

.jsbox-scrubber {
  flex: 1 1 auto; 
  min-width: 0;   
  width: 100%;
  cursor: pointer;
}

/* Estilo para Legendas de Gráficos */
.jsbox-legend {
  display: flex;
  justify-content: center;
  gap: 15px;
  font-size: 0.8rem;
  margin-top: 8px;
  color: #555;
  font-weight: 600;
}

.jsbox-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.jsbox-color-box {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}
