/* =============================================================
   ec-progress-bar.css
   In activeHome.css einbinden oder als eigene Datei laden.
   ============================================================= */


/* ── Variablen ─────────────────────────────────────────────── */
:root {
  --ec-pb-accent:            #2E75B6;
  --ec-pb-active-bg:         #1F3A5F;
  --ec-pb-done-bg:           #d4edda;
  --ec-pb-done-text:         #1a6a35;
  --ec-pb-inprogress-bg:     #fdebd0;
  --ec-pb-inprogress-text:   #784212;
  --ec-pb-default-bg:        #e4e8ed;
  --ec-pb-default-text:      #666;
  --ec-pb-locked-opacity:    0.5;
  --ec-pb-radius:            8px;
  --ec-pb-seg-count:         10;    /* muss mit SEGMENT_COUNT in JS übereinstimmen */
}


/* ── Äußerer Container ─────────────────────────────────────── */
#ec-progress-bar {
  width: 100%;
  padding: 14px 20px 10px;
  background: #f5f7fa;
  border-bottom: 1px solid #dde2ea;
  margin-bottom: 20px;
  box-sizing: border-box;
  font-family: inherit;
}


/* ── Modul-Titel ────────────────────────────────────────────── */
.ec-pb-module-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #999;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ── LE-Blöcke: horizontale Reihe ──────────────────────────── */
.ec-pb-units {
  display: flex;
  gap: 5px;
  align-items: flex-start;
}


/* ── Einzelner LE-Block ─────────────────────────────────────── */
.ec-pb-unit {
  flex: 1;
  min-width: 0;
  border-radius: var(--ec-pb-radius);
  padding: 7px 9px 6px;
  background: var(--ec-pb-default-bg);
  position: relative;
  transition: background 0.25s, flex 0.3s;
  cursor: default;
}

.ec-pb-unit-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--ec-pb-default-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}


/* ── Status-Varianten ───────────────────────────────────────── */

/* abgeschlossen */
.ec-pb-status-abgeschlossen {
  background: var(--ec-pb-done-bg);
}
.ec-pb-status-abgeschlossen .ec-pb-unit-label {
  color: var(--ec-pb-done-text);
}

/* in Bearbeitung  (Label aus DB kann Leerzeichen enthalten → beide Varianten) */
.ec-pb-status-in-bearbeitung,
.ec-pb-status-inbearbeitung {
  background: var(--ec-pb-inprogress-bg);
}
.ec-pb-status-in-bearbeitung .ec-pb-unit-label,
.ec-pb-status-inbearbeitung .ec-pb-unit-label {
  color: var(--ec-pb-inprogress-text);
}

/* gesperrt */
.ec-pb-status-gesperrt {
  opacity: var(--ec-pb-locked-opacity);
}

/* nicht begonnen / neu → default-Farbe, keine Extra-Regel nötig */


/* ── Aktive LE ──────────────────────────────────────────────── */
.ec-pb-unit.ec-pb-active {
  flex: 2;                            /* doppelt so breit wie inaktive */
  background: var(--ec-pb-active-bg);
}
.ec-pb-unit.ec-pb-active .ec-pb-unit-label {
  color: #fff;
  font-weight: 700;
}


/* ── Subbalken-Spur ─────────────────────────────────────────── */
.ec-pb-sub-track {
  margin-top: 6px;
}

.ec-pb-segments {
  display: flex;
  gap: 3px;
}

.ec-pb-seg {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  transition: background 0.3s;
}

.ec-pb-seg-filled {
  background: rgba(255, 255, 255, 0.90);
}


/* ── Mobile: Textzeile ──────────────────────────────────────── */
.ec-pb-mobile {
  font-size: 13px;
  color: #666;
  margin-top: 6px;
  display: none;   /* default: versteckt – JS/Media-Query zeigt an */
}


/* ── Responsive: Desktop zeigt Blöcke, Mobile zeigt Textzeile ─ */
@media (max-width: 767px) {
  .ec-pb-units,
  .ec-pb-module-title {
    display: none;
  }
  .ec-pb-mobile {
    display: block;
  }
}

@media (min-width: 768px) {
  .ec-pb-mobile {
    display: none;
  }
}
