/*
 * drill-down.css
 * Hierarchischer Drill-Down Filter für die Berliner Vorschriftensammlung
 */

/* Container */
.drill-down {
  padding: 1rem 0;
}

.drill-down__subtitle {
  color: #666;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Breadcrumb */
.drill-down__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  min-height: 40px;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.drill-down__breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drill-down__breadcrumb-item:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.drill-down__breadcrumb-item .close {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dee2e6;
  border-radius: 50%;
  font-size: 12px;
  color: #666;
}

.drill-down__breadcrumb-item:hover .close {
  background: #adb5bd;
  color: #fff;
}

.drill-down__breadcrumb-separator {
  color: #adb5bd;
}

.drill-down__breadcrumb-start {
  color: #666;
  font-size: 0.85rem;
}

/* Ebenen Container */
.drill-down__levels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.drill-down__level {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1.25rem;
  overflow: hidden;
  animation: drillDownSlideIn 0.35s ease-out;
}

@keyframes drillDownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.drill-down__level.removing {
  animation: drillDownSlideOut 0.25s ease-in forwards;
}

@keyframes drillDownSlideOut {
  to {
    opacity: 0;
    transform: translateY(-20px);
    height: 0;
    padding: 0;
    margin: 0;
  }
}

.drill-down__level-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.drill-down__level-number {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}

.drill-down__level-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a1a;
}

.drill-down__level-count {
  margin-left: auto;
  font-size: 0.8rem;
  color: #888;
  background: #f1f3f4;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
}

/* Bubbles */
.drill-down__bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-start;
}

.drill-down__bubble {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 2px solid transparent;
  position: relative;
}

.drill-down__bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.drill-down__bubble.selected {
  border-color: #1a1a1a;
}

.drill-down__bubble .count {
  font-size: 0.75rem;
  opacity: 0.8;
  background: rgba(255,255,255,0.3);
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
}

/* Farben nach Ebene */
.drill-down__level--1 .drill-down__level-number { background: #F5B041; }
.drill-down__level--1 .drill-down__bubble { background: #FEF5E7; color: #9A7D0A; }
.drill-down__level--1 .drill-down__bubble:hover { background: #FCF3CF; }
.drill-down__level--1 .drill-down__bubble.selected { background: #F9E79F; }

.drill-down__level--2 .drill-down__level-number { background: #AF7AC5; }
.drill-down__level--2 .drill-down__bubble { background: #F5EEF8; color: #6C3483; }
.drill-down__level--2 .drill-down__bubble:hover { background: #EBDEF0; }
.drill-down__level--2 .drill-down__bubble.selected { background: #D7BDE2; }

.drill-down__level--3 .drill-down__level-number { background: #58D68D; }
.drill-down__level--3 .drill-down__bubble { background: #EAFAF1; color: #1E8449; }
.drill-down__level--3 .drill-down__bubble:hover { background: #D5F5E3; }
.drill-down__level--3 .drill-down__bubble.selected { background: #ABEBC6; }

.drill-down__level--4 .drill-down__level-number { background: #5DADE2; }
.drill-down__level--4 .drill-down__bubble { background: #EBF5FB; color: #1A5276; }
.drill-down__level--4 .drill-down__bubble:hover { background: #D6EAF8; }
.drill-down__level--4 .drill-down__bubble.selected { background: #AED6F1; }

/* Dokument-Typ Badge */
.drill-down__doc-type {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(0,0,0,0.1);
}

/* Info Box */
.drill-down__info {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #666;
}

.drill-down__info strong {
  color: #1a1a1a;
}

/* Reset Button */
.drill-down__reset {
  background: none;
  border: 1px solid #ddd;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
}

.drill-down__reset:hover {
  background: #f1f3f4;
  border-color: #adb5bd;
}
