/* ── Spotify Widget ─────────────────────────────────────── */

.spotify-card {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md, 12px);
  background: var(--surface, #fff);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.spotify-card.spotify-playing {
  border-color: #1DB954;
  box-shadow: 0 0 0 1px #1DB95422;
}

.spotify-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.spotify-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #888);
}

.spotify-live-dot,
.spotify-idle-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.spotify-live-dot {
  background: #1DB954;
  box-shadow: 0 0 0 0 #1DB95466;
  animation: spotify-pulse 1.4s infinite;
}

.spotify-idle-dot {
  background: var(--text-muted, #aaa);
}

@keyframes spotify-pulse {
  0%   { box-shadow: 0 0 0 0 #1DB95466; }
  70%  { box-shadow: 0 0 0 6px #1DB95400; }
  100% { box-shadow: 0 0 0 0 #1DB95400; }
}

.spotify-logo {
  width: 18px;
  height: 18px;
  color: #1DB954;
  flex-shrink: 0;
}

.spotify-track-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.spotify-track-link:hover .spotify-title {
  color: #1DB954;
}

.spotify-album-art {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.spotify-album-art.spotify-spinning {
  animation: spotify-rotate 8s linear infinite;
}

@keyframes spotify-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.spotify-info {
  flex: 1;
  min-width: 0;
}

.spotify-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary, #111);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 0.2rem;
  transition: color 0.2s;
}

.spotify-artist {
  font-size: 0.78rem;
  color: var(--text-secondary, #555);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 0.15rem;
}

.spotify-album {
  font-size: 0.72rem;
  color: var(--text-muted, #888);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

/* Progress bar */
.spotify-progress-track {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.spotify-bar {
  flex: 1;
  height: 3px;
  background: var(--border, #e0e0e0);
  border-radius: 99px;
  overflow: hidden;
}

.spotify-bar-fill {
  height: 100%;
  background: #1DB954;
  border-radius: 99px;
  transition: width 1s linear;
}

.spotify-time {
  font-size: 0.65rem;
  color: var(--text-muted, #aaa);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
