/* ===================================================================
   MORDHEIM CAMPAIGN MANAGER - EXPLORATION BADGES CSS v2.0
   Styles für Hero-Badges als Pills und Warband-Bonuses
   =================================================================== */

/* ===================================================================
   HERO EXPLORATION PILLS - Im Card-Body als Field-Section
   =================================================================== */

.exploration-field {
  /* Nutzt bestehende .field Styles aus dem Roster-Editor */
}

.exploration-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.exploration-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.exploration-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  filter: brightness(1.15);
}

/* Legacy support for old badge class */
.exploration-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 12px;
}

.exploration-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.exploration-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

/* Badge Type Styles - Gelten für .exploration-pill UND .exploration-badge */

/* Academic Skills */
.badge-academic {
  background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
  color: #e8eaf6;
  border: 1px solid #5c6bc0;
}

/* Combat Skills */
.badge-combat {
  background: linear-gradient(135deg, #b71c1c 0%, #d32f2f 100%);
  color: #ffebee;
  border: 1px solid #ef5350;
}

/* Stat Bonus */
.badge-stat-bonus {
  background: linear-gradient(135deg, #1b5e20 0%, #388e3c 100%);
  color: #e8f5e9;
  border: 1px solid #66bb6a;
}

/* Blessed Weapon */
.badge-blessed {
  background: linear-gradient(135deg, #f9a825 0%, #fbc02d 100%);
  color: #1a1a1a;
  border: 1px solid #ffeb3b;
  animation: blessed-glow 2s ease-in-out infinite;
}

@keyframes blessed-glow {
  0%, 100% { box-shadow: 0 0 4px rgba(255, 235, 59, 0.4); }
  50% { box-shadow: 0 0 12px rgba(255, 235, 59, 0.8); }
}

/* Miss Next Battle */
.badge-miss-battle {
  background: linear-gradient(135deg, #e65100 0%, #f57c00 100%);
  color: #fff3e0;
  border: 1px solid #ff9800;
  animation: miss-pulse 1.5s ease-in-out infinite;
}

@keyframes miss-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Dead */
.badge-dead {
  background: linear-gradient(135deg, #212121 0%, #424242 100%);
  color: #bdbdbd;
  border: 1px solid #616161;
  text-decoration: line-through;
}

/* ===================================================================
   EXPLORATION TOOLTIP POPUP - Klick-basiert
   =================================================================== */

.exploration-tooltip-popup {
  position: fixed;
  z-index: 10000;
  min-width: 220px;
  max-width: 320px;
  padding: 0;
  background: #1a1a2e;
  border: 1px solid rgba(201, 169, 89, 0.4);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.15s ease;
  overflow: hidden;
}

.exploration-tooltip-header {
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(201, 169, 89, 0.2), rgba(201, 169, 89, 0.08));
  border-bottom: 1px solid rgba(201, 169, 89, 0.3);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gold, #c9a959);
}

.exploration-tooltip-effect {
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #d0d0d0;
}

.exploration-tooltip-source {
  padding: 6px 12px 8px;
  font-size: 0.72rem;
  color: #888;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-style: italic;
}

/* ===================================================================
   WARBAND EXPLORATION BONUSES
   =================================================================== */

.warband-exploration-bonuses {
  margin: 12px 0;
  padding: 12px;
  background: linear-gradient(135deg, rgba(103, 58, 183, 0.15) 0%, rgba(156, 39, 176, 0.15) 100%);
  border: 1px solid rgba(156, 39, 176, 0.3);
  border-radius: 8px;
}

.bonuses-header {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ce93d8;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.warband-bonus {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  font-size: 0.8rem;
  transition: background 0.2s;
}

.warband-bonus:hover {
  background: rgba(0, 0, 0, 0.5);
}

.warband-bonus .bonus-icon {
  font-size: 1.1rem;
}

.warband-bonus .bonus-text {
  flex: 1;
  color: #e0e0e0;
}

.warband-bonus .expires-tag {
  font-size: 0.7rem;
  color: #ff9800;
  background: rgba(255, 152, 0, 0.2);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Bonus Types */
.bonus-permanent {
  border-left: 3px solid #7c4dff;
}

.bonus-tactical {
  border-left: 3px solid #00bcd4;
}

.bonus-tactical.expires-next-battle {
  border-left-color: #ff9800;
}

.bonus-hate {
  border-left: 3px solid #f44336;
}

.bonus-hated {
  border-left: 3px solid #ff5722;
  background: rgba(244, 67, 54, 0.1);
}

/* ===================================================================
   UNIT CARD ENHANCEMENTS
   =================================================================== */

/* Card mit "Misses Next Battle" */
.unit-card:has(.badge-miss-battle) {
  border-color: #ff9800 !important;
  box-shadow: 0 0 10px rgba(255, 152, 0, 0.3);
}

/* Card mit "Dead" Status */
.unit-card:has(.badge-dead) {
  opacity: 0.6;
  filter: grayscale(50%);
  border-color: #616161 !important;
}

.unit-card:has(.badge-dead):hover {
  opacity: 0.8;
  filter: grayscale(30%);
}

/* Card mit Blessed Weapon */
.unit-card:has(.badge-blessed) .card-header {
  background: linear-gradient(135deg, rgba(255, 235, 59, 0.1) 0%, rgba(255, 193, 7, 0.1) 100%);
}

/* ===================================================================
   SPECIAL RULES PILLS (für Exploration-Effekte)
   =================================================================== */

.ability-pill[data-ability*="Academic"] {
  background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%) !important;
  border-color: #5c6bc0 !important;
}

.ability-pill[data-ability*="Combat Skills"] {
  background: linear-gradient(135deg, #b71c1c 0%, #d32f2f 100%) !important;
  border-color: #ef5350 !important;
}

.ability-pill[data-ability*="Blessed"] {
  background: linear-gradient(135deg, #f9a825 0%, #fbc02d 100%) !important;
  border-color: #ffeb3b !important;
  color: #1a1a1a !important;
}

.ability-pill[data-ability*="Misses Next Battle"] {
  background: linear-gradient(135deg, #e65100 0%, #f57c00 100%) !important;
  border-color: #ff9800 !important;
  animation: miss-pulse 1.5s ease-in-out infinite;
}

/* ===================================================================
   EXPLORATION TOGGLE BUTTONS (Admin)
   =================================================================== */

.exploration-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  margin: 2px;
  font-size: 0.7rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.exploration-toggle-btn.active {
  background: #4caf50;
  color: white;
}

.exploration-toggle-btn:not(.active) {
  background: rgba(255, 255, 255, 0.1);
  color: #9e9e9e;
  border: 1px dashed #616161;
}

.exploration-toggle-btn:hover {
  transform: scale(1.05);
}

/* ===================================================================
   MOBILE RESPONSIVE
   =================================================================== */

@media (max-width: 768px) {
  .exploration-badges {
    padding: 3px 6px;
    gap: 3px;
  }

  .exploration-badge {
    font-size: 0.6rem;
    padding: 2px 4px;
  }

  .warband-exploration-bonuses {
    padding: 8px;
  }

  .warband-bonus {
    padding: 4px 8px;
    font-size: 0.75rem;
  }
}

/* ===================================================================
   SUMMARY - ITEMS FOUND CARD
   =================================================================== */

.summary-card.items-found {
  background: linear-gradient(135deg, rgba(156, 39, 176, 0.15) 0%, rgba(103, 58, 183, 0.15) 100%);
  border-color: rgba(156, 39, 176, 0.3);
}

.summary-card.items-found h5 {
  color: #ce93d8;
}

.summary-card .items-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
}

.summary-card .item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  font-size: 0.85rem;
}

.summary-card .item-name {
  color: #e0e0e0;
}

.summary-card .item-count {
  color: #81c784;
  font-weight: 600;
}

.summary-card .items-note {
  font-size: 0.75rem;
  color: #9e9e9e;
  font-style: italic;
  text-align: center;
  margin-top: 4px;
}

/* ===================================================================
   ADMIN FLAGS SECTION (Hero Edit Modal)
   =================================================================== */

.admin-flags-section {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 87, 34, 0.1) 100%);
  border: 1px dashed rgba(255, 152, 0, 0.4);
  border-radius: 8px;
  padding: 12px;
  margin-top: 16px;
}

.admin-flags-section .admin-label {
  color: #ffb74d;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-flags-section .admin-hint {
  font-size: 0.7rem;
  color: #9e9e9e;
  font-weight: 400;
  font-style: italic;
}

.admin-flags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.admin-flag-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.8rem;
}

.admin-flag-item:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 152, 0, 0.3);
}

.admin-flag-item.active {
  background: rgba(76, 175, 80, 0.2);
  border-color: rgba(76, 175, 80, 0.5);
}

.admin-flag-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #4caf50;
}

.admin-flag-item .flag-icon {
  font-size: 1rem;
}

.admin-flag-item .flag-text {
  flex: 1;
  color: #e0e0e0;
}

.admin-flag-item .flag-number {
  width: 40px;
  padding: 2px 4px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #fff;
  text-align: center;
  font-size: 0.8rem;
}

.admin-flag-item .flag-number:focus {
  outline: none;
  border-color: #4caf50;
}

/* Active state colors for specific flags */
.admin-flag-item.active:has(#admin-flag-canLearnAcademicSkills:checked) {
  background: rgba(26, 35, 126, 0.3);
  border-color: rgba(92, 107, 192, 0.5);
}

.admin-flag-item.active:has(#admin-flag-canLearnCombatSkills:checked) {
  background: rgba(183, 28, 28, 0.3);
  border-color: rgba(239, 83, 80, 0.5);
}

.admin-flag-item.active:has(#admin-flag-hasBlessedWeapon:checked) {
  background: rgba(249, 168, 37, 0.3);
  border-color: rgba(255, 235, 59, 0.5);
}

.admin-flag-item.active:has(#admin-flag-missNextBattle:checked) {
  background: rgba(230, 81, 0, 0.3);
  border-color: rgba(255, 152, 0, 0.5);
}

.admin-flag-item.active:has(#admin-flag-isDead:checked) {
  background: rgba(33, 33, 33, 0.5);
  border-color: rgba(97, 97, 97, 0.5);
}

/* Mobile */
@media (max-width: 768px) {
  .admin-flags-grid {
    grid-template-columns: 1fr;
  }

  .admin-flag-item {
    padding: 10px;
  }
}
