/* Touchscreen POS layout for app-pos, plus large tap targets. */

body:has(app-pos),
body.tbs-pos-touch {
  overflow: hidden;
}

app-pos .pos-content,
section.content.pos-content {
  padding: 8px 10px 12px !important;
  min-height: calc(100vh - 72px);
}

app-pos .pos-content > .container-fluid {
  padding: 0 !important;
  max-width: none !important;
}

app-pos .pos-content > .container-fluid > form > .row {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 12px;
  margin: 0 !important;
  min-height: calc(100vh - 92px);
}

app-pos .pos-content > .container-fluid > form > .row > .col-lg-3 {
  flex: 1 1 56% !important;
  max-width: 56% !important;
  width: 56% !important;
  padding: 0 !important;
}

app-pos .pos-content > .container-fluid > form > .row > .col-lg-9 {
  flex: 1 1 44% !important;
  max-width: 44% !important;
  width: 44% !important;
  padding: 0 !important;
}

app-pos mat-card {
  height: 100%;
  border-radius: 14px !important;
}

app-pos mat-card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px !important;
}

app-pos .pos-content button.primary,
app-pos .pos-content button.secondary,
app-pos .pos-content button.success,
app-pos .pos-content button.error,
app-pos .pos-content .btn-primary {
  min-height: 48px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
}

app-pos .pos-content input.form-control,
app-pos .pos-content .form-control-sm,
app-pos .pos-content mat-select.form-control {
  min-height: 44px !important;
  font-size: 16px !important;
  border-radius: 10px !important;
}

app-pos .product-list {
  flex: 1 1 auto;
  max-height: none !important;
  overflow-y: auto !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px !important;
  padding: 8px 2px !important;
}

app-pos .card-pos {
  width: auto !important;
  height: 148px !important;
  margin: 0 !important;
  border: 1px solid #d5e4cc !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(26, 67, 56, 0.08);
  touch-action: manipulation;
}

app-pos .card-pos:active {
  transform: scale(0.97);
  background: #e8f2e1 !important;
}

app-pos .card-pos .card-text {
  font-size: 13px !important;
  font-weight: 700 !important;
  padding: 6px 6px 0 !important;
  line-height: 1.2;
  max-height: 36px;
  overflow: hidden;
}

app-pos .card-pos .product-img,
app-pos .card-pos img {
  width: 72px !important;
  height: 72px !important;
  max-height: 72px !important;
  border-radius: 10px !important;
}

app-pos table.table-pos th,
app-pos table.table-pos td {
  padding: 8px 6px !important;
  font-size: 14px !important;
  vertical-align: middle !important;
}

app-pos table.table-pos input.form-control {
  min-height: 42px !important;
  font-size: 16px !important;
}

app-pos table.table-pos .mat-mdc-mini-fab,
app-pos table.table-pos button[matminifab] {
  width: 40px !important;
  height: 40px !important;
}

app-pos .pos-content button.success {
  min-width: 160px;
  min-height: 56px !important;
  font-size: 18px !important;
  background: #1a4338 !important;
}

.tbs-qty {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tbs-qty button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: #1a4338;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 42px;
}

.tbs-qty input {
  width: 64px;
  text-align: center;
}

@media (max-width: 1100px) {
  app-pos .pos-content > .container-fluid > form > .row {
    flex-wrap: wrap !important;
    min-height: 0;
  }
  app-pos .pos-content > .container-fluid > form > .row > .col-lg-3,
  app-pos .pos-content > .container-fluid > form > .row > .col-lg-9 {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  app-pos .product-list {
    max-height: 38vh !important;
  }
  body:has(app-pos) {
    overflow: auto;
  }
}
