/* ============== DONJON MANAGER ============== */

/* Liste donjons */
.dungeon-list-item {
  transition: background 0.15s, border-color 0.15s;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
}

.dungeon-list-item:hover {
  background: rgba(154, 138, 78, 0.08) !important;
  border-color: rgba(154, 138, 78, 0.3) !important;
}

.dungeon-list-item.active {
  background: rgba(154, 138, 78, 0.15) !important;
  border-left: 3px solid #a8924e !important;
}

/* Sous-onglets */
.donjon-sub-tabs {
  border-bottom: 1px solid var(--border-color, #2d3748);
  padding: 0 0.75rem;
}

.donjon-sub-tabs .nav-link {
  color: var(--text-muted, #8899a6);
  font-size: 0.82rem;
  padding: 0.5rem 0.75rem;
  border: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.donjon-sub-tabs .nav-link:hover {
  color: var(--text-main, #e4d6c6);
  border-bottom-color: rgba(154, 138, 78, 0.3);
}

.donjon-sub-tabs .nav-link.active {
  color: #a8924e;
  border-bottom-color: #a8924e;
  background: transparent;
}

/* Room cards */
.dungeon-room-card {
  background: #1a1f2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.75rem;
}

/* Monster badges */
.dungeon-monster-badge {
  display: inline-block;
  background: rgba(119, 100, 84, 0.2);
  border: 1px solid rgba(119, 100, 84, 0.3);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-size: 0.8rem;
  color: #e4d6c6;
  min-width: 140px;
}

/* Progression arrows */
.dungeon-progression {
  text-align: center;
  padding: 0.25rem 0;
  font-size: 1.2rem;
}

/* Variant table */
.dungeon-variant-table {
  font-size: 0.8rem;
}

.dungeon-variant-table td,
.dungeon-variant-table th {
  text-align: center;
  vertical-align: middle;
  padding: 0.35rem 0.5rem;
}

.dungeon-variant-missing {
  opacity: 0.4;
  font-style: italic;
}

/* SWF coherence badges */
.dungeon-swf-ok {
  display: inline-block;
  background: rgba(74, 143, 96, 0.15);
  border: 1px solid rgba(74, 143, 96, 0.4);
  color: #198754;
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.dungeon-swf-missing {
  display: inline-block;
  background: rgba(176, 157, 92, 0.15);
  border: 1px solid rgba(176, 157, 92, 0.4);
  color: #ffc107;
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.dungeon-swf-extra {
  display: inline-block;
  background: rgba(200, 119, 67, 0.15);
  border: 1px solid rgba(200, 119, 67, 0.4);
  color: #0d6efd;
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ============== AUTOCOMPLETE SEARCH ============== */
.donjon-autocomplete-wrap {
  position: relative;
}

.donjon-autocomplete-results {
  position: absolute;
  z-index: 200;
  background: #1a0f07;
  border: 1px solid rgba(154, 138, 78, 0.4);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 2px;
}

.donjon-autocomplete-results .donjon-ac-item {
  padding: 7px 12px;
  font-size: 0.82rem;
  color: var(--text-main, #e4d6c6);
  cursor: pointer;
  border-bottom: 1px solid rgba(58, 42, 30, 0.1);
  transition: background 0.1s;
}

.donjon-autocomplete-results .donjon-ac-item:hover {
  background: rgba(154, 138, 78, 0.1);
}

.donjon-autocomplete-results .donjon-ac-item .ac-id {
  font-weight: 600;
  margin-right: 6px;
}

.donjon-autocomplete-results .donjon-ac-empty {
  padding: 7px 12px;
  font-size: 0.82rem;
  color: var(--text-muted, #8899a6);
}

/* Monster search in rooms */
.donjon-monster-search-wrap {
  position: relative;
}

.donjon-monster-search-results {
  position: absolute;
  z-index: 200;
  background: #1a0f07;
  border: 1px solid rgba(154, 138, 78, 0.4);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  width: 280px;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 2px;
}

.donjon-monster-search-results .donjon-ac-item {
  padding: 7px 12px;
  font-size: 0.82rem;
  color: var(--text-main, #e4d6c6);
  cursor: pointer;
  border-bottom: 1px solid rgba(58, 42, 30, 0.1);
  transition: background 0.1s;
}

.donjon-monster-search-results .donjon-ac-item:hover {
  background: rgba(154, 138, 78, 0.1);
}

/* Salles IDs grid */
#donjonSallesIds .input-group {
  margin-bottom: 0;
}

#donjonSallesIds .input-group-text {
  font-size: 0.7rem;
  padding: 0.15rem 0.3rem;
}
