:root {
  /* Vibrant Dark Mode Palette */
  --bg-main: #0f111a;
  --bg-surface: rgba(25, 28, 41, 0.7);
  --bg-surface-hover: rgba(35, 39, 56, 0.8);

  --primary: #004d40;
  --primary-hover: #00695c;
  --secondary: #26a69a;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  --border-color: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glow: 0 0 15px rgba(0, 77, 64, 0.5);

  /* Typography */
  --font-family: "Inter", system-ui, -apple-system, sans-serif;

  /* PicoCSS overrides */
  --background-color: var(--bg-main);
  --color: var(--text-main);
  --primary: var(--primary);
  --primary-hover: var(--primary-hover);
  --card-background-color: var(--bg-surface);
  --card-border-color: var(--border-color);
  --border-radius: 12px;
}

body {
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  background-image:
    radial-gradient(at 0% 0%, rgba(0, 77, 64, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(38, 166, 154, 0.1) 0px, transparent 50%);
  color: var(--text-main);
  overflow: hidden;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(15, 17, 26, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary);
  cursor: pointer;
}

.brand h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #26a69a, #004d40);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/*.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}*/

.nav-btn i {
  width: 18px;
  height: 18px;
}

/* Contribute button in header */
.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
  width: auto;
  text-decoration: none;
}

.nav-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

/* Main Layout */
.app-main {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100%;
}

/* Start Page */
.start-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Sticky search works better if parent is overflow: hidden */
  padding: 0 !important;
  margin: 0 !important;
}

.sticky-search {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  z-index: 100;
  pointer-events: none; /* Allow clicks to pass through to results if not on the input */
}

.hero-search {
  width: 100%;
  margin: 0;
  pointer-events: auto; /* Re-enable clicks for the search box itself */
}

.scrollable-results {
  flex: 1;
  overflow-y: auto;
  width: 100%;
  padding: 6rem 2rem 2rem 2rem; /* Increased top padding to account for floating search bar */
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3.5rem;
  font-size: 1.1rem;
  border-radius: 30px;
  background: rgba(25, 28, 41, 0.9); /* More opaque */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  box-shadow: var(--glass-shadow);
  transition: all 0.3s ease;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: var(--glow);
  outline: none;
}

.search-icon-large {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-results {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.start-page-summary {
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 2.5rem;
  font-size: 1.15rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.2px;
}

.start-page-summary strong {
  color: var(--secondary);
  font-weight: 700;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 1024px) {
  .results-grid {
    grid-template-columns: 1fr 1fr;
  }
}


.search-results.hide-title .info-header {
  display: none !important;
}

.results-column h3 {
  font-size: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

/* Map Section */
.map-section {
  flex: 1;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  margin: 0 !important;
}

.map-container {
  flex: 1;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.map-controls {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 90%;
  max-width: 400px;
}

.map-search-box {
  position: relative;
  width: 100%;
}

.map-search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border-radius: 20px;
  background: rgba(15, 17, 26, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  color: var(--text-main);
}

.search-icon-small {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

/* Sidebar for Shelf Info */
.sidebar {
  width: 400px;
  background: rgba(20, 22, 33, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 10;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.bookshelf-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  margin: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  box-shadow: none;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.close-btn i {
  width: 20px;
  height: 20px;
}

.hidden {
  display: none !important;
}

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

.info-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-main);
}

.info-header p {
  margin: 0.25rem 0 0 0;
  font-size: 0.9rem;
}

.book-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.book-card, .shelf-card, .show-all-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64px;
  cursor: pointer;
  height: 100%;
}

.shelf-card {
  background: rgba(0, 77, 64, 0.08);
  border-color: rgba(0, 77, 64, 0.4);
}

.book-card:hover, .shelf-card:hover, .show-all-card:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.shelf-card:hover {
  background: rgba(0, 77, 64, 0.15);
}

.show-all-card {
  align-items: center;
  justify-content: center;
  background: rgba(38, 166, 154, 0.05);
  border-style: dashed;
  color: var(--secondary);
  font-weight: 500;
}

.show-all-card:hover {
  background: rgba(38, 166, 154, 0.1);
  border-color: var(--secondary);
}

.book-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.book-card h4, .shelf-card h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 600;
}

.author-text {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.location-prompt-card {
  background: rgba(38, 166, 154, 0.1);
  border: 1px solid rgba(38, 166, 154, 0.4);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
  text-align: left;
  min-height: 64px;
}

.location-prompt-card:hover {
  background: rgba(38, 166, 154, 0.15);
  transform: translateY(-2px);
  border-color: var(--secondary);
  box-shadow: 0 4px 12px rgba(38, 166, 154, 0.15);
}

.location-prompt-card i {
  color: var(--secondary);
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.location-prompt-card .text-content {
  flex: 1;
}

.location-prompt-card h4 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 600;
}

.location-prompt-card p {
  margin: 0.15rem 0 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.shelf-title-row h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.small-icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.book-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.6);
}

.book-shelf-link {
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
}

.maps-link:hover i {
  color: var(--secondary);
}

.sidebar-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  padding: 4rem 1rem;
  gap: 1rem;
  grid-column: 1 / -1; /* Span all columns in grid layout */
  width: 100%;
}

.empty-state i {
  width: 48px;
  height: 48px;
  opacity: 0.5;
}


/* Upload Modal */
.upload-article {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  box-shadow: var(--glass-shadow);
  max-width: 500px;
  border-radius: 16px;
}

.upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  position: relative;
  background: rgba(0, 0, 0, 0.2);
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary);
  background: rgba(0, 77, 64, 0.1);
}

.upload-area i {
  width: 48px;
  height: 48px;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hidden-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.preview-area {
  margin-bottom: 1rem;
  text-align: center;
}

.preview-area img {
  max-width: 100%;
  max-height: 250px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.compression-stats {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Leaflet Overrides for Dark Mode */
.leaflet-layer,
.leaflet-control-zoom-in,
.leaflet-control-zoom-out,
.leaflet-control-attribution {
  filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

.leaflet-container {
  background: #222;
}

/* Fix for Leaflet Zoom Buttons and Controls */
.leaflet-control-zoom a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  line-height: 1 !important;
  padding: 0 !important;
  background-color: white !important;
  color: black !important;
}

/* Custom MarkerCluster Styling */
.custom-cluster-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px;
  height: 40px;
  background-color: rgba(38, 166, 154, 0.8); /* --secondary with transparency */
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
}

.custom-cluster-icon:hover {
  background-color: rgba(38, 166, 154, 0.8);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(38, 166, 154, 0.4);
}

.custom-cluster-icon span {
  color: white;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-family);
  line-height: 1;
}

/* Fix for the "highlight area" next to marker (focus outline & divIcon bg) */
.leaflet-div-icon {
  background: transparent !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
}

.leaflet-marker-icon:focus,
.leaflet-marker-icon:active,
.leaflet-marker-icon:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.custom-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--primary);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  font-size: 18px;
  margin: 0 !important;
}

/* Small adjustments */
.small {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  width: auto;
}

/* Side-by-side View */
body.is-shelf-view .map-section {
  flex: 0 0 30%;
  display: flex;
}

body.is-shelf-view .sidebar {
  display: flex;
  flex: 1;
  width: auto;
}

body.is-shelf-view .start-page {
  display: none;
}

/* Map View Only */
body.is-map-view .map-section {
  display: flex;
  flex: 1;
}

body.is-map-view .start-page,
body.is-map-view .sidebar {
  display: none;
}

/* Start Page View Only */
body:not(.is-map-view):not(.is-shelf-view) .start-page {
  display: flex;
}

body:not(.is-map-view):not(.is-shelf-view) .map-section,
body:not(.is-map-view):not(.is-shelf-view) .sidebar {
  display: none;
}

/* Mobile Layout */
@media (max-width: 768px) {
  body.is-shelf-view .app-main {
    flex-direction: column;
  }

  .map-section {
    height: 100%;
  }

  body.is-shelf-view .map-section {
    height: 120px;
    flex: none;
  }

  body.is-shelf-view .map-section .map-controls {
    display: none; /* Hide map controls in thin bar mode */
  }

  .sidebar {
    width: 100%;
    height: auto;
    flex: 1;
    border-left: none;
    border-top: 1px solid var(--border-color);
  }
}

/* ============================================================
   Modal overlay & box
============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}

.modal-overlay.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-box {
  background: #161924;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.6),
    var(--glow);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;
  animation: slideUp 0.2s ease;
}

.modal-box--narrow {
  max-width: 420px;
}

@keyframes slideUp {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

.modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #26a69a, #004d40);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  margin: 0;
  line-height: 1;
  border-radius: 8px;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ============================================================
   Login section
============================================================ */
.modal-intro {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.contribute-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  margin: 0;
}

.contribute-action-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.contribute-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gh-icon {
  display: flex;
  align-items: center;
}

/* Device flow box */
.login-status {
  margin-top: 1rem;
  font-size: 0.85rem;
  border-radius: 10px;
  line-height: 1.5;
}

.login-status.info {
  color: var(--text-muted);
}
.login-status.error {
  color: #f87171;
}
.login-status.success {
  color: #4ade80;
}

.device-flow-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  text-align: center;
}

.device-flow-box p {
  margin: 0.4rem 0;
}
.device-flow-box a {
  color: var(--secondary);
}

.device-code {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--secondary);
  background: rgba(38, 166, 154, 0.12);
  border: 2px solid rgba(38, 166, 154, 0.3);
  border-radius: 10px;
  padding: 0.5rem 1rem;
  margin: 0.75rem 0;
  font-family: "Courier New", monospace;
}

.device-flow-box .hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ============================================================
   Upload section
============================================================ */
.upload-user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.85rem;
}

.user-info {
  color: var(--secondary);
  font-weight: 500;
}

.logout-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  margin: 0;
  transition: all 0.2s;
}

.logout-btn:hover {
  border-color: #f87171;
  color: #f87171;
}

/* Upload area inside contribute modal */
.upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  position: relative;
  background: rgba(0, 0, 0, 0.15);
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary);
  background: rgba(0, 77, 64, 0.1);
}

.upload-area-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

/* File queue */
.file-queue {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
  max-height: 300px;
  overflow-y: auto;
}

.queue-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  animation: slideUp 0.2s ease;
}

.queue-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

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

.queue-filename {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.35rem;
}

.queue-status-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.queue-status-text.processing {
  color: var(--secondary);
}
.queue-status-text.error {
  color: #f87171;
}
.queue-status-text .ready {
  color: #4ade80;
}

.queue-shelf-select {
  margin-top: 0.4rem;
  width: 100%;
  font-size: 0.78rem;
  padding: 0.3rem 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  cursor: pointer;
}

.queue-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  margin: 0;
  flex-shrink: 0;
  border-radius: 6px;
  transition: all 0.15s;
  width: auto;
  min-width: auto;
  line-height: 1;
}

.queue-remove:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

/* PR status */
.pr-status {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.pr-status.info {
  color: var(--text-muted);
}
.pr-status.error {
  color: #f87171;
}
.pr-status.success {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.pr-status a {
  color: var(--secondary);
}

/* ============================================================
   Shelf search modal
============================================================ */
.shelf-search-list {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.shelf-search-row {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.shelf-search-row:hover {
  background: rgba(0, 77, 64, 0.15);
  border-color: var(--primary);
}

/* Loading Overlay */
.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  width: 100%;
  grid-column: 1 / -1; /* Span all columns */
}

.loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(38, 166, 154, 0.1);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-content p {
  margin: 0;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.95rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}




/* Load More Button */
.load-more-container {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
  width: 100%;
  grid-column: 1 / -1; /* Span all columns in grid layout */
}

.load-more-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: auto;
  min-width: 160px;
}

.load-more-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  color: var(--text-main);
}

.load-more-btn:active {
  transform: translateY(0);
}



