/* ═══════════════════════════════════════════
   Life Lion Fortschritt – Monatlicher Fortschrittsbalken
   ═══════════════════════════════════════════
   Shortcode: [lifelion_fortschritt]
   Standalone wiederverwendbar – kein Layout-Wrapper nötig.
   ═══════════════════════════════════════════ */

.llb-f-card {
  padding: 28px 24px;
  border-radius: 20px;
  background: #ffffff;
  border: 1.5px solid #e8e8e6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03), 0 8px 32px rgba(0,0,0,0.03);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Header: Eyebrow + Betrag + Prozent ── */
.llb-f-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.llb-f-amounts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.llb-f-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b8d8c;
}

.llb-f-values {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}

.llb-f-current {
  font-size: 28px;
  font-weight: 700;
  color: #242625;
  letter-spacing: -0.5px;
}

/* ── Balken ──
   Obermargin (40px) nimmt den Ziel-Chip auf, der oberhalb des Tracks schwebt.
   Kein overflow:hidden – Marker und Chip sollen den Track überragen dürfen. */
.llb-f-bar {
  position: relative;
  height: 10px;
  border-radius: 5px;
  background: #e8e8e6;
  margin: 40px 0 16px;
}

/* Pending-Zone: von 0 bis zum Ziel, mit diagonaler Schraffur im Accent-Ton.
   Der Fill liegt darüber – der sichtbare Teil der Schraffur ist also immer
   "current → goal", also genau die Lücke bis zum Ziel. */
.llb-f-pending {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  border-radius: 5px 0 0 5px;
  background-color: rgba(252,196,53,0.06);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(252,196,53,0.22) 0 5px,
    rgba(252,196,53,0.06) 5px 10px
  );
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Fill: aktuelle Spendenhöhe, solid Accent-Gelb. Darf optisch über den
   Ziel-Marker hinausschießen – genau der Kickstarter-Effekt. */
.llb-f-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #fcc435, #f5bc1a);
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Ziel-Marker ──
   Dünner vertikaler Strich auf dem Track, darüber ein kleiner dunkler
   Chip mit Ziel-Betrag und Pfeil-Spitze. Die horizontale Position
   transitioniert weich, wenn die Obergrenze stretched. */
.llb-f-goal {
  position: absolute;
  top: -5px;
  bottom: -5px;
  left: 0;
  width: 1.5px;
  background: #242625;
  border-radius: 1px;
  transform: translateX(-50%);
  transition: left 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 2;
}

.llb-f-goal-label {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 9px;
  background: #fef8e6;
  color: #242625;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  line-height: 1.2;
  box-shadow: 0 1px 3px rgba(36,38,37,0.08);
}
.llb-f-goal-label::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #fef8e6;
}

/* Ziel erreicht: Chip wird solide Accent-Gelb mit Check */
.llb-f-card.is-goal-reached .llb-f-goal {
  background: #f5bc1a;
}
.llb-f-card.is-goal-reached .llb-f-goal-label {
  background: #fcc435;
  color: #242625;
  box-shadow: 0 1px 3px rgba(252,196,53,0.35);
}
.llb-f-card.is-goal-reached .llb-f-goal-label::after {
  border-top-color: #fcc435;
}
.llb-f-card.is-goal-reached .llb-f-goal-label::before {
  content: '✓ ';
  font-weight: 700;
}

/* Reduced motion: schalte Balken-Animation ab */
@media (prefers-reduced-motion: reduce) {
  .llb-f-fill,
  .llb-f-pending,
  .llb-f-goal {
    transition: none;
  }
}

/* ═══════════════════════════════════════════
   MINI-VARIANT
   [lifelion_fortschritt variant="mini"]
   Nur Balken, Betrag im Fill, Ziel-Chip + Deadline rechts.
   Reused Klassen: .llb-f-bar, .llb-f-pending, .llb-f-fill, .llb-f-current,
                   .llb-f-goal, .llb-f-goal-label
   Neue Klassen:   .llb-f-amount (Fill-Label), .llb-f-deadline-mini
   ═══════════════════════════════════════════ */
.llb-f-card--mini {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  max-width: 420px;
  margin: 0 auto;
}

.llb-f-card--mini .llb-f-bar {
  height: 18px;
  border-radius: 9px;
  background: rgba(36, 38, 37, 0.07);
  /* Kein eigener Top-Margin — der Ziel-Chip schwebt ueber den Bar in
     den Abstand hinein, den der Aufrufer ueber dem Shortcode laesst.
     Uebersteuert Base .llb-f-bar margin: 40px 0 16px. */
  margin: 0;
}

.llb-f-card--mini .llb-f-pending {
  border-radius: 9px 0 0 9px;
}

.llb-f-card--mini .llb-f-fill {
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  /* Container-Query-Anker: descendants reagieren auf Fill-Breite. */
  container-type: inline-size;
  container-name: lf-fill;
}

/* "monatlich 7.021 €" dezent im Fill, rechtsbuendig.
   Clipping: wenn der Fill sehr schmal ist, wird der Text abgeschnitten. */
.llb-f-card--mini .llb-f-amount {
  font-size: 10.5px;
  font-weight: 500;
  color: #242625;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: 0 10px;
  opacity: 0.4;
}

/* Schmaler Fill: "monatlich"-Praefix ausblenden, nur Betrag bleibt.
   Selektor muss .llb-f-card--mini enthalten, damit er Specificity der
   Default-Regeln darueber matcht. */
@container lf-fill (max-width: 110px) {
  .llb-f-card--mini .llb-f-amount-prefix {
    display: none;
  }
}

/* Sehr schmaler Fill (Mobile bei kleinen Spendenstaenden):
   Betrag mittig im Fill, kleiner gesetzt, weniger Padding,
   damit nichts mehr beschnitten wird. */
@container lf-fill (max-width: 75px) {
  .llb-f-card--mini .llb-f-amount {
    font-size: 9.5px;
    padding: 0 4px;
    flex: 1;
    text-align: center;
  }
}

/* Full-Variant-Styles fuer .llb-f-current (28px / 700 / -0.5px) wuerden
   hier durchschlagen — fuer Mini alles vom Parent (.llb-f-amount) erben. */
.llb-f-card--mini .llb-f-current {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  color: inherit;
}

.llb-f-card--mini .llb-f-goal {
  top: -3px;
  bottom: -3px;
}

/* Kleiner als die Full-Variante, aber selbe Chip-Optik (hellgelb). */
.llb-f-card--mini .llb-f-goal-label {
  padding: 3px 8px;
  font-size: 10px;
  bottom: calc(100% + 6px);
}

.llb-f-card--mini .llb-f-deadline-mini {
  text-align: right;
  margin-top: 8px;
  font-size: 11px;
  color: #c4c5c4;
  letter-spacing: 0.02em;
}

/* ── Footer: Unterstützer + Deadline ── */
.llb-f-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.llb-f-supporters,
.llb-f-deadline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #8b8d8c;
}
