/* Small hand-written polish that doesn't belong as inline Tailwind utilities. */

html {
  color-scheme: light dark;
}

::selection {
  background: rgba(102, 114, 244, 0.35);
}

/* Slim, unobtrusive scrollbar matching the dark/light palette */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(120, 128, 148, 0.35);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 128, 148, 0.55);
  background-clip: content-box;
}

/* Status pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
  white-space: nowrap;
}
.status-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.status-pill--pending {
  background: rgba(148, 158, 179, 0.14);
  color: rgb(148, 158, 179);
}
.status-pill--pending .dot {
  background: rgb(148, 158, 179);
}

.status-pill--processing {
  background: rgba(102, 114, 244, 0.14);
  color: rgb(102, 114, 244);
}
.status-pill--processing .dot {
  background: rgb(102, 114, 244);
  animation: pulse-dot 1.4s ease-in-out infinite;
}

.status-pill--done {
  background: rgba(52, 211, 153, 0.14);
  color: rgb(16, 150, 105);
}
.status-pill--done .dot {
  background: rgb(52, 211, 153);
}

.status-pill--error {
  background: rgba(242, 116, 92, 0.14);
  color: rgb(196, 84, 61);
}
.status-pill--error .dot {
  background: rgb(242, 116, 92);
}

@media (prefers-color-scheme: dark) {
  .status-pill--done {
    color: rgb(52, 211, 153);
  }
  .status-pill--error {
    color: rgb(242, 116, 92);
  }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.book-row {
  animation-fill-mode: backwards;
}
