/* =============================================================
   BE:KI Grade – Komponenten-System
   Eingebunden in BE:KI Loop Social (ergänzt styles.css)
   ============================================================= */

/* Animationen */
@keyframes bk-bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40%            { transform: translateY(-6px); }
}
@keyframes bk-fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bk-fade-in { animation: bk-fadeIn .3s ease forwards; }


/* ─── Header ──────────────────────────────────────────────── */
.bk-header {
  background: #fff;
  display: flex;
  align-items: center;
  padding: 10px 24px;
  border-bottom: 3px solid #1e3d73;
  box-shadow: 0 2px 10px rgba(30, 61, 115, .12);
  gap: 0;
}

.bk-header-logo {
  color: #1e3d73;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .04em;
  font-family: Georgia, serif;
}
.bk-header-logo span { color: #3a8c68; }

.bk-header-logo-img {
  height: 96px;
  object-fit: contain;
  background: #fff;
}

.bk-header-div {
  width: 2px;
  height: 32px;
  background: #dde3ec;
  margin: 0 18px;
}

.bk-header-sub {
  color: #6b7a8d;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
}

/* Breadcrumb */
.bk-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  color: #4b5a6e;
}
.bk-breadcrumb .bc-root   { color: #1e3d73; font-weight: 700; }
.bk-breadcrumb .bc-sep    { color: #3a8c68; font-size: 20px; font-weight: 700; }
.bk-breadcrumb .bc-module { color: #1e3d73; }
.bk-breadcrumb .bc-active { color: #3a8c68; font-weight: 700; }


/* ─── Phasen-Leiste ───────────────────────────────────────── */
.bk-phase-bar {
  background: #f4f7fb;
  border-bottom: 2px solid #dde3ec;
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 52px;
  gap: 0;
}

.bk-phase-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  cursor: pointer;
}
.bk-phase-item.disabled { opacity: .4; cursor: default; }
.bk-phase-item.active .bk-phase-num { background: #3a8c68; }
.bk-phase-item.done   .bk-phase-num { background: #1e3d73; }
.bk-phase-item.done   .bk-phase-label { color: #1e3d73; }

.bk-phase-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.bk-phase-label { font-size: 13px; font-weight: 700; }
.bk-phase-sep   { color: #3a8c68; font-size: 18px; font-weight: 700; margin: 0 2px; }

/* Fortschrittsbalken */
.bk-progress-bar {
  height: 4px;
  background: linear-gradient(90deg, #1e3d73, #3a8c68);
  transition: width .4s ease;
}


/* ─── Chat ────────────────────────────────────────────────── */
.bk-chat-scroll {
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bk-chat-inner {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* KI-Nachricht */
.bk-ki-bubble { display: flex; gap: 10px; align-items: flex-start; }
.bk-ki-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1e3d73;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: 0 2px 6px rgba(30, 61, 115, .35);
}
.bk-ki-text {
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 4px 16px 16px 16px;
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #1e293b;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
  max-width: 90%;
}

/* User-Nachricht */
.bk-user-bubble { display: flex; justify-content: flex-end; }
.bk-user-text {
  background: #1e3d73;
  color: #fff;
  border-radius: 16px 4px 16px 16px;
  padding: 10px 16px;
  font-size: 13.5px;
  line-height: 1.65;
  max-width: 80%;
  white-space: pre-wrap;
  box-shadow: 0 2px 8px rgba(30, 61, 115, .3);
}

/* Tipp-Animation */
.bk-thinking-dots { display: flex; gap: 5px; align-items: center; padding: 4px 0; }
.bk-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3a8c68;
  animation: bk-bounce 1.4s infinite ease-in-out;
}
.bk-dot:nth-child(2) { animation-delay: .2s; }
.bk-dot:nth-child(3) { animation-delay: .4s; }

/* Abgehakt */
.bk-answered-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 6px 5px 10px;
  font-size: 12.5px;
  color: #2d7055;
  background: #f0faf5;
  border-radius: 8px;
  margin-bottom: 5px;
  border: 1px solid #c8e8d8;
}
.bk-answered-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3a8c68;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}
.bk-answered-text { color: #1a4a30; font-weight: 500; line-height: 1.4; }


/* ─── Widgets ─────────────────────────────────────────────── */
.bk-widget-wrap { padding: 4px 0 4px 42px; }

/* Radio / Checkbox Option */
.bk-radio-option,
.bk-check-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 9px;
  cursor: pointer;
  border: 1.5px solid #dde3ec;
  background: #fff;
  font-size: 13.5px;
  color: #1a2740;
  transition: all .13s;
  user-select: none;
  margin-bottom: 7px;
}
.bk-radio-option:hover { border-color: #1e3d73; background: #e8eef8; box-shadow: inset 0 0 0 1px #1e3d73; }
.bk-check-option:hover { border-color: #3a8c68; background: #f0faf5; }
.bk-radio-option.selected { border-color: #1e3d73; background: #dce6f5; color: #1e3d73; font-weight: 700; box-shadow: inset 0 0 0 1px #1e3d73; }
.bk-check-option.selected { border-color: #3a8c68; background: #ddf0e8; color: #1a5c3a; font-weight: 700; box-shadow: inset 0 0 0 1px #3a8c68; }

/* Radio mit Beschreibung */
.bk-radio-ann-option {
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  border: 1.5px solid #dde3ec;
  background: #fff;
  transition: all .13s;
  user-select: none;
  margin-bottom: 7px;
}
.bk-radio-ann-option:hover    { border-color: #1e3d73; background: #eef2fa; }
.bk-radio-ann-option.selected { border-color: #1e3d73; background: #eef2fa; }
.bk-radio-ann-label { font-size: 13.5px; color: #1a2740; font-weight: 500; }
.bk-radio-ann-option.selected .bk-radio-ann-label { color: #1e3d73; font-weight: 600; }
.bk-radio-ann-hint  { font-size: 11.5px; color: #6b7a8d; font-style: italic; margin-top: 3px; }

/* Chips */
.bk-rb-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; margin-bottom: 10px; }
.bk-rb-chip {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .12s;
  user-select: none;
}
.bk-rb-chip:hover  { opacity: .8; }
.bk-rb-chip.active { border-color: currentColor; }

/* Prozentzahl-Summe */
.bk-pct-sum {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-weight: 600;
}


/* ─── Eingabefelder ───────────────────────────────────────── */
.bk-text-inp {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid #dde3ec;
  border-radius: 9px;
  font-size: 13.5px;
  font-family: inherit;
  color: #1a2740;
  background: #f8fafc;
  transition: border-color .15s;
  outline: none;
}
.bk-text-inp:focus { border-color: #3a8c68; }

.bk-hint-text { font-size: 12px; color: #6b7a8d; margin-bottom: 10px; line-height: 1.5; }


/* ─── Eingabe-Bar ─────────────────────────────────────────── */
.bk-input-bar {
  background: #fff;
  border-top: 1px solid #eef1f5;
  padding: 14px 24px;
}
.bk-input-bar-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
}
.bk-send-textarea {
  flex: 1;
  border: 1.5px solid #dde3ec;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13.5px;
  font-family: inherit;
  resize: none;
  outline: none;
  line-height: 1.6;
  min-height: 44px;
  max-height: 120px;
  color: #1e293b;
}
.bk-send-textarea:focus { border-color: #3a8c68; }
.bk-send-btn {
  padding: 0 18px;
  background: #3a8c68;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  min-height: 44px;
}
.bk-send-btn:hover { background: #2d7055; }
.bk-send-btn:disabled { background: #c8d4ea; cursor: not-allowed; }


/* ─── Buttons ─────────────────────────────────────────────── */
.bk-btn {
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  background: #1e3d73;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background .15s;
}
.bk-btn:hover:not(:disabled) { background: #2a4f8f; }
.bk-btn:disabled              { background: #c8d0dc; cursor: not-allowed; }

.bk-btn-green {
  background: #3a8c68;
  box-shadow: 0 3px 10px rgba(58, 140, 104, .35);
}
.bk-btn-green:hover:not(:disabled) { background: #2d7055; }
.bk-btn-green:disabled             { background: #8fb8a8; cursor: wait; box-shadow: none; }

.bk-btn-ghost {
  background: #f0f4f8;
  border: 1.5px solid #dde3ec;
  color: #1e3d73;
}

.bk-api-key-btn {
  margin-left: auto;
  background: #1e3d73;
  border: none;
  border-radius: 9px;
  padding: 7px 16px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bk-copy-btn {
  background: none;
  border: 1.5px solid #c8d4ea;
  border-radius: 8px;
  padding: 5px 14px;
  color: #6b7a8d;
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all .2s;
}
.bk-copy-btn.copied { border-color: #3a8c68; color: #3a8c68; }

.bk-phase-next-btn {
  margin-left: auto;
  padding: 8px 18px;
  background: #3a8c68;
  color: #fff;
  border: none;
  border-radius: 9px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}


/* ─── Karten ──────────────────────────────────────────────── */
/* Fall-Karte */
.bk-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 780px;
  width: 100%;
}
.bk-case-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 14px;
  cursor: pointer;
  border: 2px solid #c8d4ea;
  box-shadow: 0 2px 12px rgba(30, 61, 115, .08);
  transition: all .18s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.bk-case-card:hover { border-color: #1e3d73; box-shadow: 0 6px 24px rgba(30, 61, 115, .15); transform: translateY(-2px); }
.bk-case-emoji      { font-size: 22px; }
.bk-case-title      { font-size: 13.5px; font-weight: 700; color: #1e3d73; }
.bk-case-desc       { font-size: 12.5px; color: #6b7a8d; line-height: 1.5; }

/* Modus-Karte */
.bk-mode-card {
  background: #fff;
  border: 2px solid #3a8c68;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  gap: 14px;
  align-items: center;
  box-shadow: 0 2px 8px rgba(58, 140, 104, .10);
  transition: all .15s;
  margin-bottom: 10px;
}
.bk-mode-card:hover          { box-shadow: 0 6px 20px rgba(58, 140, 104, .28); transform: translateY(-1px); }
.bk-mode-card.disabled       { border-color: #e0e6ef; cursor: not-allowed; opacity: .52; box-shadow: none; }
.bk-mode-emoji               { font-size: 24px; line-height: 1; flex-shrink: 0; }
.bk-mode-title               { font-weight: 700; color: #1e3d73; font-size: 14px; margin-bottom: 3px; }
.bk-mode-desc                { color: #4b5a6e; font-size: 12.5px; line-height: 1.5; }
.bk-mode-lock                { margin-top: 8px; font-size: 12px; color: #b06a20; font-weight: 600; display: flex; align-items: center; gap: 5px; }

/* Quickstart-Grid */
.bk-qs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.bk-qs-btn {
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid #3a8c68;
  background: #fff;
  color: #1e3d73;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  transition: all .15s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.bk-qs-btn:hover { background: #3a8c68; color: #fff; }
.bk-qs-emoji     { font-size: 20px; }


/* ─── Ergebnis-Box ────────────────────────────────────────── */
.bk-result-box {
  background: #fff;
  border: 1.5px solid #dde3ec;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}
.bk-result-toolbar {
  background: #f4f7fb;
  border-bottom: 1px solid #eef1f5;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bk-result-textarea {
  width: 100%;
  min-height: 440px;
  border: none;
  padding: 18px 20px;
  font-size: 13.5px;
  font-family: 'Courier New', monospace;
  resize: vertical;
  outline: none;
  line-height: 1.75;
  background: #fff;
  color: #1e293b;
}

/* Kontext-Box */
.bk-context-box {
  background: #f8fafd;
  border: 1px solid #dde3ec;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.bk-context-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #6b7a8d;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.bk-context-text { font-size: 13px; color: #334155; line-height: 1.7; white-space: pre-wrap; }

/* Fehler-Box */
.bk-error-box {
  font-size: 13px;
  color: #c0392b;
  background: #fef2f2;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 8px;
}


/* ─── Footer ──────────────────────────────────────────────── */
.bk-footer {
  background: #fff;
  border-top: 1px solid #dde3ec;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bk-footer-copy        { font-size: 11.5px; color: #9ba8bb; font-weight: 500; }
.bk-footer-copy strong { color: #6b7a8d; font-weight: 600; }
