/* ============================================================================
   SCANNER COMPONENTS
   ============================================================================ */



.scanner-modal,
#scanner-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .9);
  z-index: 9999;
  display: none;
}

.scanner-modal.active,
#scanner-modal.active {
  display: block;
}

.scanner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: rgba(0, 0, 0, .8);
  color: #fff;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 10000;
}

.scanner-header h4 {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-left: 0;
  color: #fff;
  font-size: 1.1em;
  font-weight: 500;
}

.scanner-inline-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0;
  width: 28px;
  height: 28px;
  color: #c21a26;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.scanner-inline-btn:hover {
  color: #a1161f;
}

.scanner-inline-btn svg {
  width: 25px;
  height: 25px;
}

.close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  padding: 5px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

#scanner-preview {
  width: 100%;
  max-width: 600px;
  height: 60vh;
  margin: 20px auto;
  background: black;
  position: relative;
}

.scanner-controls {
  padding: 15px 20px;
  background: rgba(0, 0, 0, .8);
  position: fixed;
  bottom: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  padding: 8px 15px;
  border-radius: 25px;
}

.control-group label {
  font-size: .9em;
  white-space: nowrap;
}

#zoom-range {
  -webkit-appearance: none;
  appearance: none;
  width: 150px;
  height: 4px;
  background: transparent;
  border: none;
  border-radius: 2px;
  accent-color: #c21a26;
  --percent: 50%;
}

#zoom-range:focus {
  outline: none;
}

/* WebKit (Safari/iOS/Chrome) track */
#zoom-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right,
      #c21a26 0%,
      #c21a26 var(--percent),
      #444 var(--percent),
      #444 100%);
}

/* WebKit thumb */
#zoom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2px solid #c21a26;
  border-radius: 50%;
  margin-top: -6px;
  cursor: pointer;
}

/* Firefox */
#zoom-range::-moz-range-track {
  height: 4px;
  background: #444;
  border: none;
  border-radius: 2px;
}

#zoom-range::-moz-range-progress {
  height: 4px;
  background: #c21a26;
  border-radius: 2px 0 0 2px;
}

#zoom-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2px solid #c21a26;
  border-radius: 50%;
  cursor: pointer;
}

/* Edge (legacy) */
#zoom-range::-ms-track {
  height: 4px;
  background: transparent;
  border-color: transparent;
  color: transparent;
}

#zoom-range::-ms-fill-lower {
  background: #c21a26;
  border-radius: 2px 0 0 2px;
}

#zoom-range::-ms-fill-upper {
  background: #444;
  border-radius: 0 2px 2px 0;
}

.flash-btn {
  background: #c21a26;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 8px;
  margin-left: 15px;
  cursor: pointer;
}

.flash-btn.active {
  background: #ffd700;
}

.flash-btn svg {
  fill: #fff;
  width: 100%;
  height: 100%;
}

.flash-btn.active svg {
  fill: #333;
}