/* ===================================================================
   WARBAND RULES SYSTEM - CSS Styling
   Für Anzeige von Sonderregeln auf Einheiten-Karten
   =================================================================== */

/* ---------------------------------------------------------------
   WARBAND-WEITE REGELN (im Roster-Header)
   --------------------------------------------------------------- */
.warband-rules-section {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(0, 0, 0, 0.3));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.warband-rules-section .section-header {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--gold, #f59e0b);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Warband Special Rules in Header */
.warband-special-rules {
  margin-top: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(0, 0, 0, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
}

.warband-rules-header {
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--gold, #f59e0b);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.warband-rules-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.warband-rule-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  border-left: 3px solid var(--gold, #f59e0b);
  font-size: 0.85rem;
  line-height: 1.4;
}

.warband-rule-item .rule-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.warband-rule-item strong {
  color: #f0f0f0;
}

.warband-rule-item .rule-text {
  color: #bbb;
  flex: 1;
}

.warband-rules-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.warband-rule {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  border-left: 3px solid var(--gold, #f59e0b);
}

.warband-rule .rule-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.warband-rule strong {
  color: #f0f0f0;
  margin-right: 4px;
}

.warband-rule .rule-text {
  color: #aaa;
  font-size: 0.85rem;
  line-height: 1.4;
}

/* ---------------------------------------------------------------
   EINHEITEN-SONDERREGELN (auf Karten)
   --------------------------------------------------------------- */
.unit-special-rules {
  margin-top: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.unit-special-rules .rules-header {
  font-size: 0.7rem;
  font-weight: bold;
  color: var(--gold, #f59e0b);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.unit-special-rules .rules-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Special Rules Field in Unit Cards */
.special-rules-field {
  margin-top: 8px;
}

.special-rules-field > label {
  font-size: 0.7rem;
  font-weight: bold;
  color: var(--gold, #f59e0b);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}

.special-rules-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.special-rule-item {
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  border-left: 3px solid var(--gold, #f59e0b);
  transition: background 0.2s ease;
}

.special-rule-item:hover {
  background: rgba(0, 0, 0, 0.4);
}

.special-rule-item .rule-icon {
  font-size: 1rem;
  margin-right: 6px;
}

.special-rule-item .rule-name {
  font-weight: bold;
  color: #f0f0f0;
  font-size: 0.85rem;
}

.special-rule-item .rule-desc {
  display: block;
  font-size: 0.75rem;
  color: #999;
  line-height: 1.4;
  margin-top: 4px;
  font-style: italic;
}

/* Effekt-spezifische Styles */
.special-rule-item.effect-no-xp {
  border-left-color: #6b7280;
  background: rgba(107, 114, 128, 0.1);
}

.special-rule-item.effect-fear {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.special-rule-item.effect-frenzy {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.special-rule-item.effect-immune {
  border-left-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

/* ---------------------------------------------------------------
   REGEL-ITEM (einzelne Regel)
   --------------------------------------------------------------- */
.rule-item {
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.rule-item:hover {
  background: rgba(0, 0, 0, 0.35);
}

.rule-item .rule-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.rule-item .rule-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.rule-item .rule-name {
  font-weight: bold;
  color: #f0f0f0;
  font-size: 0.85rem;
}

.rule-item .rule-source-label {
  font-size: 0.7rem;
  color: #666;
  font-style: italic;
  margin-left: auto;
}

.rule-item .rule-description {
  font-size: 0.8rem;
  color: #999;
  line-height: 1.4;
  font-style: italic;
}

/* ---------------------------------------------------------------
   FARBKODIERUNG NACH QUELLE
   --------------------------------------------------------------- */
.rule-source-warband {
  border-left: 3px solid #f59e0b; /* Gold - Warband-weit */
}

.rule-source-unit {
  border-left: 3px solid #3b82f6; /* Blau - Einheiten-Typ */
}

.rule-source-skill {
  border-left: 3px solid #10b981; /* Grün - Erlernte Fähigkeit */
}

.rule-source-mutation {
  border-left: 3px solid #8b5cf6; /* Lila - Mutation */
}

.rule-source-spell {
  border-left: 3px solid #ec4899; /* Pink - Zauberspruch */
}

.rule-source-equipment {
  border-left: 3px solid #6366f1; /* Indigo - Ausrüstung */
}

.rule-source-unknown {
  border-left: 3px solid #6b7280; /* Grau - Unbekannt */
}

/* ---------------------------------------------------------------
   KOMPAKTE REGEL-BADGES (für Listen)
   --------------------------------------------------------------- */
.rule-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  font-size: 0.75rem;
  color: #ccc;
  cursor: help;
  transition: all 0.2s ease;
}

.rule-badge:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

.rule-badge.rule-source-warband {
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.rule-badge.rule-source-unit {
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.rule-badge.rule-source-skill {
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* ---------------------------------------------------------------
   SPEZIFISCHE EFFEKT-STYLES
   --------------------------------------------------------------- */

/* No Experience Notice (bereits vorhanden, ergänzt) */
.no-xp-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(107, 114, 128, 0.15);
  border: 1px dashed rgba(107, 114, 128, 0.4);
  border-radius: 6px;
  color: #9ca3af;
  font-size: 0.8rem;
  font-style: italic;
}

/* Fear/Terror Indicator */
.rule-item[data-effect="causeFear"],
.rule-item[data-effect="causeTerror"] {
  background: rgba(239, 68, 68, 0.1);
}

/* Frenzy Indicator */
.rule-item[data-effect="frenzy"] {
  background: rgba(245, 158, 11, 0.1);
}

/* Psychology Immunity */
.rule-item[data-effect="immunePsychology"] {
  background: rgba(59, 130, 246, 0.1);
}

/* ---------------------------------------------------------------
   RESPONSIVE ANPASSUNGEN
   --------------------------------------------------------------- */
@media (max-width: 768px) {
  .warband-rules-section {
    padding: 10px 12px;
  }

  .warband-rule {
    flex-direction: column;
    gap: 4px;
  }

  .unit-special-rules {
    padding: 8px;
  }

  .rule-item .rule-header {
    flex-wrap: wrap;
  }

  .rule-item .rule-source-label {
    width: 100%;
    margin-left: 0;
    margin-top: 2px;
  }
}

/* ---------------------------------------------------------------
   PRINT STYLES
   --------------------------------------------------------------- */
@media print {
  .warband-rules-section,
  .unit-special-rules {
    border: 1px solid #ccc;
    background: none;
  }

  .rule-item {
    border-left-color: #666;
    page-break-inside: avoid;
  }
}
