/* CSS für Datensatz-Listenansicht */

/* Dataset Controls */
.dataset-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.dataset-search {
  flex: 1;
  max-width: 400px;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  background-color: white;
  transition: border-color 0.3s ease;
}

.dataset-search:focus {
  outline: none;
  border-color: #07A299;
  box-shadow: 0 0 0 3px rgba(7, 162, 153, 0.1);
}

.dataset-search::placeholder {
  color: #999;
}

/* Controls Right Side */
.controls-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Sort Controls */
.sort-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-weight: 500;
  color: #666;
  white-space: nowrap;
}

.sort-select {
  padding: 8px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.sort-select:focus {
  outline: none;
  border-color: #07A299;
}

/* Sort Button Controls */
.sort-controls span {
  font-weight: 500;
  color: var(--syntax-highlight-fg);
}

.sort-option {
  padding: 0.5rem 1rem;
  border: 1px solid var(--syntax-highlight-comment);
  background: var(--syntax-highlight-bg);
  color: var(--syntax-highlight-fg);
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.sort-option:hover {
  background: var(--syntax-highlight-comment);
  border-color: var(--syntax-highlight-fg);
}

.sort-option.active {
  background: var(--syntax-highlight-fg);
  color: var(--syntax-highlight-bg);
  border-color: var(--syntax-highlight-fg);
}

/* View Toggle */
.view-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-toggle-label {
  font-weight: 500;
  color: #666;
}

.view-toggle-container {
  display: flex;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  background: white;
}

.view-btn {
  background: white;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 14px;
}

.view-btn:hover {
  background: #f5f5f5;
}

.view-btn.active {
  background: #07A299;
  color: white;
}

.view-btn.active:hover {
  background: #066f6a;
}

/* Kategorien-Filter */
.category-filter-container {
  margin-bottom: 1em;
}

.category-filter-container h4 {
  margin: 0 0 8px 0;
  font-size: 1em;
  color: #333;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  margin: 3px;
  border-radius: 20px;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: 2px solid transparent;
  font-weight: 500;
  min-height: 36px;
}

.category-badge .category-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.8);
  backdrop-filter: blur(1px);
  padding: 0;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.category-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.category-badge.active {
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  border-color: currentColor;
}

/* Filter-Container */
.tag-filter-container,
.format-filter-container {
  margin-bottom: 20px;
  width: 100%;
}

.filter-heading {
  margin-bottom: 10px;
  font-weight: bold;
  color: #555;
}

.format-badge {
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.format-badge:hover {
  border-color: #07A299;
  color: #07A299;
}

.format-badge.active {
  background-color: #07A299;
  color: white;
  border-color: #07A299;
}

.format-list,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.tag-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #f1f1f1;
  border-radius: 16px;
  font-size: 0.9em;
  cursor: pointer;
  transition: background-color 0.2s;
}

.tag-badge.active {
  background: #07A299;
  color: white;
}

.tag-badge:hover {
  background: #e0e0e0;
}

.tag-badge.active:hover {
  background: #058a82;
}

/* Datasets Table */
.datasets-table {
  width: 100%;
  border-collapse: collapse;
}

.datasets-table th {
  text-align: left;
  padding: 8px 12px;
  background: #f5f5f5;
  border-bottom: 2px solid #ddd;
}

.datasets-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.datasets-table tr:hover {
  background: #f9f9f9;
}

/* Tile View */
.datasets-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.dataset-tile {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  transition: all 0.3s ease;
  position: relative; /* Für absolute positioning der Icons */
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
  height: 100%; /* Gleiche Höhe für alle Kacheln in einer Reihe */
}

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

.dataset-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dataset-tile-header {
  padding: 15px;
  background: #f9f9f9;
  border-bottom: 1px solid #eee;
}

.dataset-tile-image {
  background: #ccf0eb;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px; /* Feste Höhe für alle Bilder */
  overflow: hidden;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  position: relative; /* Für absolute positioning der Kategorie-Icons */
}

.dataset-tile-image img {
  object-fit: cover; /* Ändere von contain zu cover für vollständige Abdeckung */
  width: 100%;
  height: 100%;
  padding: 0; /* Entferne Padding für vollständige Abdeckung */
}

.dataset-tile-title {
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 1.5em; /* Feste Höhe für den Titel */
}

.dataset-tile-title a {
  color: #07A299;
  text-decoration: none;
}

.dataset-tile-title a:hover {
  text-decoration: underline;
}

.dataset-tile-body {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.dataset-tile-org {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 10px;
}

.dataset-tile-desc {
  font-size: 0.9em;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  flex-grow: 1; /* Beschreibung nimmt verfügbaren Platz ein */
}

.dataset-tile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
  max-height: 4.5em; /* Begrenzte Höhe für Tag-Bereich */
  overflow: hidden;
}

.dataset-tile-tag {
  font-size: 0.8em;
  background: #f1f1f1;
  padding: 2px 8px;
  border-radius: 12px;
}

.dataset-tile-category-tag {
  font-size: 0.8em;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid;
  background: transparent !important;
  font-weight: 500;
  margin-right: 2px;
}

.dataset-tile-tracking {
  margin-top: 8px;
  padding: 6px 0;
  border-top: 1px solid #eee;
  font-size: 0.8em;
  color: #666;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tracking-total {
  font-weight: 500;
  color: #333;
}

.tracking-recent {
  font-size: 0.9em;
  color: #888;
}

.dataset-tile-format {
  display: inline-block;
  background: transparent;
  color: black;
  border: 1px solid black;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.75em;
  font-weight: 500;
  margin-right: 4px;
  margin-bottom: 2px;
}

.dataset-tile-footer {
  background: #f9f9f9;
  padding: 12px;
  border-top: 1px solid #eee;
  text-align: left;
  margin-top: auto;
  min-height: 20px;
}

/* Highlight für Suchtreffer */
.highlight {
  background-color: #ffff00;
  font-weight: bold;
}
