/* Copyright 2016 Mozilla Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

[hidden] {
  display: none !important;
}

/* ── Toolbar buttons ─────────────────────────────────────────────────────── */

/* toolbar buttons now use .tb-btn class defined inline in the blade */

/* ── Loading bar ─────────────────────────────────────────────────────────── */

#loadingBar {
  height: 4px;
  background-color: #444;
}

#loadingBar .progress {
  position: absolute;
  left: 0;
  width: 0;
  height: 100%;
  background-color: #3b82f6; /* blue-500 */
  transition: width 200ms;
}

#loadingBar .progress.indeterminate {
  background-color: #6b7280;
  transition: none;
}

@keyframes progressIndeterminate {
  0% { left: 0; }
  50% { left: 100%; }
  100% { left: 100%; }
}

#loadingBar .indeterminate .glimmer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 5rem;
  background-image: linear-gradient(to right, #6b7280 0%, #d1d5db 50%, #6b7280 100%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  animation: progressIndeterminate 2s linear infinite;
}

/* ── PDF viewer pages ────────────────────────────────────────────────────── */

#viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
}

#viewer canvas {
  margin: auto;
  display: block;
}

/* ── Page number input — hide browser spinner ────────────────────────────── */

#pageNumber::-webkit-inner-spin-button,
#pageNumber::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#pageNumber {
  -moz-appearance: textfield;
}
