/* =========================================================
   Issue Badge — komponent renderujacy linki do zagadnien
   =========================================================
   Architektura 3-warstwowa:
   1. Kolor tla      → data-type     (tracker: wymaganie/pomysl/blad/zadanie)
   2. Styl czcionki  → data-status-group (backlog/active/pending/closed)
   3. Hint Window     → data-tooltip  (tooltip na hover — przyszly krok)
   ========================================================= */

:root {
  /* --- PALETA TLA (Typy Zadań) - Pastelowe i nieinwazyjne --- */
  --bg-wymaganie: #dcfce7; /* Bardzo jasny mietowy/zielony */
  --bg-pomysl:    #fef08a; /* Jasny zolty/bananowy */
  --bg-blad:      #fee2e2; /* Jasny, pastelowy czerwony/rozowy */
  --bg-zadanie:   #e0f2fe; /* Bardzo jasny niebieski */

  /* --- PALETA CZCIONEK (Statusy Zadan) --- */
  --text-base:    #1e293b; /* Glowny, ciemny kolor dla czytelnosci (Slate 800) */
  --text-muted:   #475569; /* Stonowany tekst dla oczekujacych (Slate 600) */
}

/* --- BAZOWY KOMPONENT --- */
.issue-badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0.15em 0.5em !important;
  border-radius: 4px !important;
  font-family: 'JetBrains Mono', Consolas, monospace !important;
  font-size: 0.9em !important;
  text-decoration: none !important;
  transition: filter 0.2s ease, transform 0.1s ease !important;
  position: relative !important;
  cursor: help !important;
  white-space: nowrap !important;
  line-height: 1.4 !important;
  vertical-align: middle !important;
  /* Domyslne tlo i tekst (nieznany tracker) */
  background-color: #F3F4F6 !important;
  color: #6B7280 !important;
}

/* Delikatny efekt po najechaniu myszka */
.issue-badge:hover {
  filter: brightness(0.93) !important;
}

/* =========================================
   A. TLO — zalezne od atrybutu data-type
   ========================================= */
.issue-badge[data-type="wymaganie"] { background-color: var(--bg-wymaganie) !important; }
.issue-badge[data-type="pomysl"]    { background-color: var(--bg-pomysl) !important; }
.issue-badge[data-type="blad"]      { background-color: var(--bg-blad) !important; }
.issue-badge[data-type="zadanie"]   { background-color: var(--bg-zadanie) !important; }

/* =========================================
   B. CZCIONKA — zalezne od data-status-group
   ========================================= */

/* 1. Backlog (Nowy) — standardowy, neutralny */
.issue-badge[data-status-group="backlog"] {
  color: var(--text-base) !important;
  font-weight: normal !important;
  font-style: normal !important;
  text-decoration: none !important;
  opacity: 1 !important;
}

/* 2. Aktywne / Wymaga uwagi (Analiza, W trakcie, Zwrocony) */
.issue-badge[data-status-group="active"] {
  color: #000000 !important;
  font-weight: bold !important;
  font-style: normal !important;
  text-decoration: none !important;
  opacity: 1 !important;
}

/* 3. Oczekujace / Zaparkowane (Zawieszony, Rozwiazany, Wymaga potwierdzenia, Potwierdzony) */
.issue-badge[data-status-group="pending"] {
  color: var(--text-muted) !important;
  font-style: italic !important;
  font-weight: normal !important;
  text-decoration: none !important;
  opacity: 1 !important;
}

/* 4. Zakonczony cykl zycia (Zamkniety, Odrzucony) */
.issue-badge[data-status-group="closed"] {
  color: var(--text-muted) !important;
  text-decoration: line-through !important;
  font-weight: normal !important;
  font-style: normal !important;
  opacity: 0.7 !important;
}

/* =========================================
   C. Kompatybilnosc z selekcja wierszy Opale
   (inline style override — kolory przetrwaja zaznaczenie)
   ========================================= */
#wrapper table.list tr.context-menu-selection > td .issue-badge {
  color: unset !important;
}
