:root {
  --pico-font-size: 100%;
  --pico-spacing: 0.75rem;
  --pico-typography-spacing-vertical: 0.75rem;
  --pico-form-element-spacing-vertical: 0.5rem;
}

.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--pico-spacing);
}

.page-header h1 {
  margin-bottom: 0;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.row-actions form {
  margin-bottom: 0;
}

.muted {
  color: var(--pico-muted-color);
}

.empty-state {
  color: var(--pico-muted-color);
  text-align: center;
  padding: 2rem 0;
}

.entries {
  list-style: none;
  padding: 0;
}

.entry {
  display: flex;
  align-items: center;
  gap: var(--pico-spacing);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.entry form {
  margin-bottom: 0;
  margin-left: auto;
}

.entry-detail {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.entry-detail span {
  font-size: 0.85em;
}

.drag-handle {
  cursor: grab;
  color: var(--pico-muted-color);
  user-select: none;
}

.poster {
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.poster-missing {
  background: var(--pico-muted-border-color);
}

.error-banner {
  background: var(--pico-del-color, #e5484d);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
}

.search-results {
  list-style: none;
  padding: 0;
  margin-top: 0;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 4px;
  max-height: 22rem;
  overflow-y: auto;
}

.search-results .entry {
  padding: 0.4rem 0.6rem;
}

#search-results.htmx-request {
  opacity: 0.6;
}

.manifest-url {
  display: flex;
  gap: 0.5rem;
}

.manifest-url input,
.manifest-url button {
  margin-bottom: 0;
}

.manifest-url input {
  font-family: var(--pico-font-family-monospace);
  font-size: 0.8em;
  min-width: 18rem;
}

.notice-banner {
  background: var(--pico-ins-color, #398712);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
}

.sync-error {
  color: var(--pico-del-color, #e5484d);
}

.entry-detail .source-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: inherit;
}

.entry-detail .source-badge {
  padding: 0 0.4rem;
  border-radius: 4px;
  background: var(--pico-muted-border-color);
  font-size: 0.75em;
}

.source-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.status-badge {
  padding: 0 0.4rem;
  border-radius: 4px;
  font-size: 0.75em;
  white-space: nowrap;
}

.status-badge[data-tooltip] {
  border-bottom: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.status-ok {
  background: #1c6954;
  color: #fff;
}

.status-failing {
  background: #883835;
  color: #fff;
}

.status-pending,
.status-paused {
  background: var(--pico-muted-border-color);
}

.source-health {
  margin: 0;
  padding: 0;
}

.source-health li {
  list-style: none;
  font-size: 0.85em;
  white-space: nowrap;
}
