/* Smooth theme transitions */
html {
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* PDF container: fixed height, overflow hidden — pan/zoom handled by JS transform */
#pdf-container {
  overflow: hidden;
  height: calc(100vh - 160px);
  position: relative;
  touch-action: none;
}

/* Zoom wrapper: GPU-composited transform layer */
#pdf-zoom-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

/* PDF canvas: prevent drag/download */
#pdf-container canvas {
  user-select: none;
  -webkit-user-drag: none;
  display: block;
}

/* Active song highlight in display control */
.song-row.is-active {
  border-left: 4px solid var(--bs-primary);
  background-color: var(--bs-primary-bg-subtle);
}

/* Label badges with dynamic colors (inline style for background) */
.label-badge {
  display: inline-block;
  padding: 0.15em 0.45em;
  border-radius: 0.25rem;
  font-size: 0.78em;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

/* Drag-and-drop zone styling */
.border-dashed {
  border-style: dashed !important;
}

/* Viewer: full-height text area on mobile */
@media (max-width: 767.98px) {
  #text-content {
    max-height: calc(100vh - 200px) !important;
  }
  #pdf-container {
    height: calc(100vh - 150px);
  }
}

/* Landing page centering fix for short viewports */
@media (max-height: 500px) {
  .container[style*="min-height: 70vh"] {
    min-height: auto !important;
    padding-top: 2rem;
  }
}
