/* Barcode scanner modal — mobile + desktop web */

.wb-barcode-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.wb-barcode-modal[hidden] {
  display: none !important;
}

.wb-barcode-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 26, 20, 0.55);
}

.wb-barcode-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: #fffdf8;
  border: 1px solid #e1d6b9;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(28, 43, 34, 0.2);
  padding: 1.1rem 1.15rem 1.2rem;
}

.wb-barcode-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.wb-barcode-modal__head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1c2b22;
}

.wb-barcode-modal__close {
  border: none;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: #5a635c;
}

.wb-barcode-modal__hint,
.wb-barcode-modal__status {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: #5a635c;
}

.wb-barcode-modal__reader {
  width: 100%;
  min-height: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: #111a14;
  margin-bottom: 0.75rem;
}

.wb-barcode-modal__reader video {
  width: 100% !important;
  max-height: 320px;
  object-fit: cover;
  display: block;
}

.wb-barcode-modal__actions {
  display: flex;
  justify-content: flex-end;
}

.wb-barcode-modal__btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  background: #1f4d3b;
  color: #fff;
  font-weight: 700;
  padding: 0.55rem 1.15rem;
  cursor: pointer;
}

body.wb-barcode-open {
  overflow: hidden;
}

/* Keep scan button visible on web and mobile */
.site-search-form__scan {
  display: inline-flex !important;
}
