/* Mobile shop: IMEI, warranty, insurance on sales / POS / invoices */

.tbs-mob-box {
  margin-top: 6px;
  padding: 8px;
  background: #f4faf6;
  border: 1px solid #c8e9c7;
  border-radius: 8px;
  text-align: left;
  font-weight: 400;
}

.tbs-mob-grid {
  display: grid;
  grid-template-columns: minmax(140px, 1.4fr) minmax(110px, 1fr) minmax(90px, 0.8fr) minmax(120px, 1fr);
  gap: 6px;
}

.tbs-mob-box label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: #265c25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tbs-mob-box input,
.tbs-mob-box select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid #bbc9cc;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  background: #fff;
  text-transform: none;
  letter-spacing: 0;
}

.tbs-mob-box textarea {
  min-height: 48px;
  padding: 6px 8px;
  border: 1px solid #bbc9cc;
  border-radius: 6px;
  font-size: 13px;
  font-family: ui-monospace, Consolas, monospace;
  resize: vertical;
}

.tbs-cam-field {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.tbs-cam-field > input,
.tbs-cam-field > textarea {
  flex: 1;
  min-width: 0;
}

.tbs-cam-field-grow {
  flex: 1;
  min-width: 0;
}

.tbs-cam-btn {
  flex: 0 0 auto;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #265c25;
  border-radius: 8px;
  background: #347433;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.tbs-cam-btn .material-icons {
  font-size: 22px;
  line-height: 1;
  color: #fff;
}

.tbs-cam-btn:active {
  background: #265c25;
}

.tbs-mob-box .tbs-cam-btn {
  height: 32px;
  width: 36px;
  min-width: 36px;
}

app-pos .tbs-mob-box .tbs-cam-btn {
  height: 36px;
}

.tbs-cam-host {
  position: relative;
}

.tbs-cam-host > input.form-control,
.tbs-cam-host > input {
  padding-right: 48px;
}

.tbs-cam-host > .tbs-cam-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  height: 36px;
  width: 36px;
  min-width: 36px;
}

#tbs-cam-scan {
  position: fixed;
  inset: 0;
  z-index: 2147483640;
  background: rgba(10, 18, 12, 0.72);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}

.tbs-cam-card {
  width: 100%;
  max-width: 520px;
  background: #111827;
  color: #f9fafb;
  border-radius: 16px 16px 12px 12px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  font-family: Roboto, "Segoe UI", sans-serif;
}

.tbs-cam-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.tbs-cam-top strong {
  font-size: 16px;
}

.tbs-cam-top button,
.tbs-cam-actions button {
  appearance: none;
  border: 0;
  border-radius: 8px;
  height: 40px;
  padding: 0 14px;
  font-weight: 600;
  cursor: pointer;
}

.tbs-cam-top button {
  background: #374151;
  color: #fff;
}

.tbs-cam-view {
  position: relative;
  background: #000;
  min-height: 280px;
  height: min(52vh, 420px);
}

.tbs-cam-view video,
#tbs-cam-reader,
#tbs-cam-reader video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

#tbs-cam-reader {
  position: absolute;
  inset: 0;
}

.tbs-cam-frame {
  pointer-events: none;
  position: absolute;
  left: 10%;
  right: 10%;
  top: 32%;
  bottom: 32%;
  border: 2px solid rgba(163, 214, 162, 0.95);
  border-radius: 10px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.28);
}

.tbs-cam-hint {
  margin: 0;
  padding: 10px 14px 4px;
  font-size: 13px;
  color: #d1d5db;
}

.tbs-cam-actions {
  padding: 10px 14px 14px;
}

.tbs-cam-actions button {
  width: 100%;
  background: #347433;
  color: #fff;
}

@media (max-width: 900px) {
  .tbs-mob-box .tbs-cam-btn,
  app-pos .tbs-mob-box .tbs-cam-btn,
  .tbs-cam-host > .tbs-cam-btn {
    height: 44px;
    width: 44px;
    min-width: 44px;
  }
}

.tbs-mob-box input.tbs-mob-bad {
  border-color: #b53346;
  background: #fff5f6;
}

.tbs-mob-ins {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(120px, 1.2fr) minmax(110px, 1fr) minmax(80px, 0.7fr) minmax(90px, 0.8fr);
  gap: 6px;
  align-items: end;
}

.tbs-mob-ins .tbs-mob-check {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  text-transform: none;
  font-size: 12px;
  height: 32px;
}

.tbs-mob-ins .tbs-mob-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.tbs-mob-hint {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-size: 11px;
  color: #6b7280;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.tbs-mob-hint.is-warn {
  color: #9a4500;
}

.tbs-mob-hint.is-err {
  color: #b53346;
}

app-pos .tbs-mob-grid {
  grid-template-columns: minmax(130px, 1.6fr) minmax(80px, 0.7fr) minmax(90px, 0.8fr);
}

app-pos .tbs-mob-ins {
  grid-template-columns: auto 1fr 1fr;
}

app-pos .tbs-mob-box {
  padding: 6px;
}

app-pos .tbs-mob-box input,
app-pos .tbs-mob-box select {
  height: 36px;
  font-size: 14px;
}

#tbs-mob-nav a {
  cursor: pointer;
}

#tbs-mob-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 36, 16, 0.4);
  z-index: 2147482500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow: auto;
}

.tbs-mob-card {
  width: 100%;
  max-width: 720px;
  background: #fff;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  font-family: Roboto, "Segoe UI", sans-serif;
}

.tbs-mob-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #1b3d1a;
}

.tbs-mob-card p.tbs-mob-help {
  margin: 0 0 14px;
  color: #4b5563;
  font-size: 13px;
}

.tbs-mob-search {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.tbs-mob-search input {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #bbc9cc;
  border-radius: 8px;
  font-size: 15px;
  font-family: ui-monospace, Consolas, monospace;
}

.tbs-mob-search button {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #347433;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.tbs-mob-result {
  border: 1px solid #d7e5e8;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.tbs-mob-result h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.tbs-mob-result p {
  margin: 0 0 2px;
  font-size: 13px;
  color: #374151;
}

.tbs-mob-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.tbs-mob-badge.ok {
  background: #c8e9c7;
  color: #1b3d1a;
}

.tbs-mob-badge.exp {
  background: #fde2d3;
  color: #9a4500;
}

.tb-invoice .tbs-mob-line,
#salesOrderForInvoice .tbs-mob-line {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 400;
  color: #4b5563;
  line-height: 1.35;
}

.tb-invoice .tbs-mob-line strong,
#salesOrderForInvoice .tbs-mob-line strong {
  color: #111827;
  font-weight: 600;
}

@media (max-width: 900px) {
  .tbs-mob-grid,
  .tbs-mob-ins,
  app-pos .tbs-mob-grid,
  app-pos .tbs-mob-ins {
    grid-template-columns: 1fr 1fr;
  }
}
