/* ============================================================================
 * FlowLab-specifik CSS
 *
 * Komplementerar main.css — överrider inga befintliga regler. Alla nya klasser
 * är prefixade med .fl- för att garantera att vi inte kolliderar med
 * OSS/BSS-simulatorns klasser.
 *
 * Strukturen följer main.css-konventionen: typografi och färger ärvs, vi lägger
 * bara på layout och FlowLab-specifika element.
 * ========================================================================== */

/* --- Layout-stommen --------------------------------------------------------- */

.fl-body {
  /* Återanvänder body-baselinen från main.css. Egen klass så vi kan toggle:a
   * temaövergångar senare utan att röra main.css. */
}

.fl-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 4px;
}

.fl-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fl-header-row h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.fl-intro {
  margin: 10px 0 6px;
  color: #444;
  max-width: 72ch;
  line-height: 1.5;
}

.fl-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* --- Experimentmarkör ------------------------------------------------------- */

.fl-experiment-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #fff8e1;
  color: #8a6500;
  border: 1px solid #f5b400;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* --- Navigation tillbaka till telecom -------------------------------------- */

.fl-back-link {
  display: inline-block;
  margin-top: 6px;
  color: #4a6cf7;
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px dotted transparent;
  transition: border-color 0.15s;
}

.fl-back-link:hover {
  border-bottom-color: #4a6cf7;
}

.fl-back-link:focus-visible {
  outline: 2px solid #4a6cf7;
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Bootstrap-status (skelett-fas) ---------------------------------------- */

.fl-boot-status {
  margin: 4px 0;
  padding: 8px 12px;
  background: #f0f3f8;
  border-left: 3px solid #c7cfd9;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  color: #555;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.fl-boot-status.fl-boot-ok {
  background: #e6f4ea;
  border-left-color: #2da66a;
  color: #1f5a3c;
}

.fl-note {
  margin: 0 0 14px;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

/* --- Kontroller (knappar + presets) --------------------------------------- */

.fl-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 10px;
}

.fl-preset-label {
  margin-left: 8px;
  font-size: 12px;
  color: #666;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-left: 1px solid #d6dbe5;
  padding-left: 12px;
}

/* --- Engine status / debug-rad -------------------------------------------- */

.fl-status-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #555;
  padding: 8px 12px;
  background: #f0f3f8;
  border-left: 3px solid #c7cfd9;
  border-radius: 0 4px 4px 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  transition: background 0.2s, border-color 0.2s;
}

.fl-status-row.fl-status-running {
  background: #e6f4ea;
  border-left-color: #2da66a;
}

.fl-status-row strong {
  color: #222;
  font-weight: 600;
}

.fl-wipgate-closed {
  color: #b94a00;
  font-weight: 700;
}

/* --- Kanban ---------------------------------------------------------------- */

.fl-kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.fl-column {
  background: #f5f7fb;
  border-radius: 8px;
  padding: 10px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.fl-column-done {
  background: #eef7f1;
}

.fl-column-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  border-bottom: 1px solid #e1e6ee;
  padding-bottom: 6px;
}

.fl-column-title {
  font-weight: 600;
  font-size: 13px;
  color: #333;
}

.fl-column-count {
  font-size: 11px;
  color: #777;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.fl-cards {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 2px;
}

.fl-card {
  background: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  border-left: 3px solid #4a6cf7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.fl-card-id {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 600;
  color: #222;
}

.fl-card-status {
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fl-card.fl-card-processing {
  border-left-color: #2da66a;
  background: #f4fbf6;
}

.fl-card.fl-card-processing .fl-card-status {
  color: #2da66a;
  font-weight: 700;
}

.fl-card.fl-card-done {
  border-left-color: #888;
  opacity: 0.85;
}

.fl-card.fl-card-enter {
  animation: fl-card-glide 0.25s ease-out;
}

.fl-card.fl-card-glide {
  animation: fl-card-glide 0.25s ease-out;
}

@keyframes fl-card-glide {
  from { opacity: 0.2; transform: translateY(-4px) scale(0.96); }
  to   { opacity: 1;   transform: translateY(0)    scale(1); }
}

/* --- KPI-cards ------------------------------------------------------------- */

.fl-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.fl-kpi-card {
  background: #fff;
  border: 1px solid #e1e6ee;
  border-radius: 6px;
  padding: 10px 12px;
}

.fl-kpi-label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fl-kpi-value {
  font-size: 22px;
  font-weight: 600;
  margin-top: 4px;
  color: #222;
  font-variant-numeric: tabular-nums;
}

.fl-kpi-unit {
  font-size: 12px;
  color: #888;
  margin-left: 3px;
  font-weight: 400;
}

/* --- Responsiv ------------------------------------------------------------ */

@media (max-width: 720px) {
  .fl-kanban {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================================
 * Reserverade sektioner för kommande commits:
 *   .fl-experiment-row, sliders             — commit 4 (reglage)
 *   .fl-observation                         — commit 5 (pedagogisk loop)
 *   .fl-reflection-list                     — commit 5 (reflection)
 *   .fl-compare-row                         — commit 6 (jämförelse)
 * ========================================================================== */
