/* My Library page (/library.html): tabs, panels, sign-in prompt, and the
   small per-tab extras (History's timestamp/remove row, Following's
   unfollow button) that sit alongside the shared .media-card/.creator-card
   renderers rather than duplicating them. */

.library-page {
  padding-block: var(--space-6) var(--space-10);
}

.library-page__heading {
  margin: 0 0 var(--space-6);
  font-size: clamp(var(--font-size-2xl), 4vw, var(--font-size-3xl));
}

.library-signin-prompt {
  padding: var(--space-8);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.library-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-6);
}

.library-tab {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.library-tab:hover {
  color: var(--color-text);
}

.library-tab.is-active {
  color: var(--color-accent);
  border-bottom-color: var(--gv-purple-bright);
}

.library-history__header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-4);
}

/* Appended by libraryPage.js under a History card's existing meta line —
   a "last watched" timestamp plus a Remove action, without touching
   video-card.js's own markup for the rest of the card. */
.media-card__history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.media-card__history-remove {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0;
  font-size: var(--font-size-xs);
  text-decoration: underline;
}

.media-card__history-remove:hover,
.media-card__history-remove:focus-visible {
  color: var(--color-accent);
}

.library-following-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.library-following-card .creator-card {
  width: 100%;
}

.library-following-card__unfollow[aria-pressed="true"] {
  border-color: var(--gv-purple);
  color: var(--color-accent);
}
