/* Logo, Bibliotheks-Toolbar und lokale Suche */

/* Logo-Container */
.logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-wrap:hover {
  transform: scale(1.05);
}

/* Das freigestellte Kronen-TV-Icon */
.header-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  /* Subtiler goldener Lichtschein um die Konturen des Kranzes */
  filter: drop-shadow(0 2px 6px rgba(245, 197, 24, 0.35));
  transition: filter 0.2s ease;
}

.logo-wrap:hover .header-logo-img {
  filter: drop-shadow(0 0 12px rgba(245, 197, 24, 0.65));
}

.logo {
  font-size: 32px;
  color: var(--accent);
  line-height: 1;
  /* Verschiebt den Schriftzug um 2-3px nach unten zur perfekten optischen Mitte */
  transform: translateY(2.5px);
}

/* Für die mobile Ansicht */
@media (max-width: 768px) {
  .logo {
    font-size: 25px;
    transform: translateY(1.5px);
  }
}

@media (max-width: 768px) {
  #rouletteBtn {
    display: none !important;
  }
  #profileBtn {
    order: 3 !important;
    margin-left: auto !important;
  }
  .settings-wrap {
    order: 4 !important;
  }
}

/* Toolbar-Rechts-Gruppe (Suchleiste & Sortierung) */
.toolbar-actions-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-left: auto;
  align-self: stretch;
}

.sort-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}

.local-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 220px;
  margin-top: auto;
}

/* Lokales Bibliotheks-Suchfeld */
.local-search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 200px;
  max-width: 260px;
}

.local-search-input {
  width: 100%;
  padding: 6px 32px 6px 12px !important;
  font-size: 12.5px !important;
  height: 32px;
  background: var(--bg-card) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
  transition: all 0.2s ease;
}

/* Lupe rechts platziert */
.local-search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--text-dim);
  pointer-events: none;
}

/* ✕-Button ebenfalls exakt rechts zentriert */
.local-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.15s ease;
}

.local-search-clear:hover {
  color: var(--accent);
}

.local-search-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent-glow) !important;
}

.local-search-clear {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 11px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.15s ease;
}

.local-search-clear:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .toolbar-actions-group {
    width: 100%;
    justify-content: space-between;
  }
  .local-search-box {
    flex: 1;
    min-width: 140px;
    max-width: 100%;
  }
}

/* Ändern-Button auf belegten Favoriten-Slots */
.pin-slot-change-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(17, 19, 24, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
}

.pinned-slot:hover .pin-slot-change-btn {
  opacity: 1;
  transform: scale(1);
}

.pin-slot-change-btn:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  transform: scale(1.12);
}

@media (max-width: 768px) {
  .pin-slot-change-btn {
    opacity: 0.9;
  }
}
