/* ─── Offline Library ─── */
.offline-library {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.offline-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
}

.offline-library-header-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.offline-library-header-icon {
  flex-shrink: 0;
  color: var(--accent);
}

.offline-library-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.offline-library-count {
  font-size: 13px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.offline-library-header-stat {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--text-muted) 6%, transparent);
}

.offline-library-header-stat--interactive {
  cursor: help;
}

.offline-library-header-stat--interactive:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.offline-library-disk-breakdown {
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 148px;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-md), 0 10px 28px rgba(0, 0, 0, 0.38);
  transition: opacity 0.15s ease;
}

.offline-library-disk-breakdown-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
}

.offline-library-disk-breakdown-divider {
  height: 1px;
  margin: 6px 0;
  background: var(--border-subtle);
}

.offline-library-disk-breakdown-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.offline-library-disk-breakdown-icon--library {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.offline-library-disk-breakdown-icon--favorites {
  color: #f38ba8;
  background: color-mix(in srgb, #f38ba8 14%, transparent);
  border: 1px solid color-mix(in srgb, #f38ba8 30%, transparent);
}

.offline-library-disk-breakdown-size {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.offline-library-disk-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.offline-library-disk-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.offline-library-server {
  font-size: 10px;
  color: var(--text-muted);
  margin: 0;
}

.offline-library-card .album-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.offline-library-card-year {
  min-height: 1.35em;
  line-height: 1.35;
  margin-top: 0;
}

.offline-library-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.offline-library-enqueue {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 10px;
  padding: 2px 6px;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.offline-library-enqueue:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.offline-library-tracks {
  font-size: 10px;
  color: var(--text-muted);
}

.offline-library-delete {
  background: none;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.offline-library-delete:hover {
  color: var(--danger);
}

.offline-library-delete--spacer {
  visibility: hidden;
  pointer-events: none;
}

/* Filter tabs */
.offline-filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.offline-filter-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.offline-filter-tab:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.offline-filter-tab.active {
  background: var(--accent);
  color: var(--bg-app);
  border-color: var(--accent);
  font-weight: 600;
}

.offline-filter-tab-count {
  font-size: 11px;
  opacity: 0.75;
}

.offline-filter-tab.active .offline-filter-tab-count {
  opacity: 0.85;
}

/* Artist discography groups */
.offline-artist-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.offline-artist-group-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.album-detail {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.album-detail-header {
  position: relative;
  padding: var(--space-6) var(--space-6) 0;
  overflow: hidden;
}

.album-detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  opacity: 0.35;
  transition: opacity var(--transition-slow);
}

.album-detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(30, 30, 46, 0.5) 0%,
      var(--bg-app) 100%);
  z-index: 0;
}

.album-detail-hero {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
  padding: var(--space-4) 0 var(--space-6);
}

.album-detail-cover-btn {
  padding: 0;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
  display: block;
  width: clamp(120px, 15vw, 200px);
  height: clamp(120px, 15vw, 200px);
}

.album-detail-cover-btn:hover .album-detail-cover {
  transform: scale(1.04);
}

.album-detail-cover {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
  display: block;
  transition: transform 0.2s ease;
}

