
/* ============================================================
   MOBILE-RESPONSIVE-SWEEP-v1 (2026-05-15)
   Универсални fix-ове за phone usage в склад/път.
   НЕ пипа business logic / desktop layout.
   ============================================================ */
@media (max-width: 768px) {
  /* 1. iOS zoom prevention — inputs must be >=16px */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea {
    font-size: 16px !important;
  }

  /* 2. Touch targets — minimum 44x44px */
  button,
  .btn,
  input[type="submit"],
  input[type="button"],
  a.btn,
  .nav-link,
  .dropdown-item {
    min-height: 44px;
  }
  button.btn-sm, .btn-sm, input[type="submit"].btn-sm { min-height: 36px; }

  /* 3. Wide tables — horizontal scroll wrapper */
  .table-responsive,
  .table-wrap,
  .table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  /* Auto-wrap для прямых таблиц без обвёртки */
  table.table,
  table.dataTable,
  table.products-table,
  table.scan-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  /* 4. Forms — stack labels above inputs */
  .form-row,
  .form-inline {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .form-row > *,
  .form-inline > * {
    width: 100%;
    margin-bottom: .5rem;
  }
  label.col-form-label,
  label.form-label {
    display: block;
    margin-bottom: .25rem;
  }

  /* 5. Long URLs/SKUs — break words */
  td, .cell-data { word-break: break-word; }
}

/* 6. Modal/drawer full-screen on small phones */
@media (max-width: 600px) {
  .modal-dialog:not(.modal-fullscreen):not(.modal-sm) {
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 100vh;
  }
  .modal-content {
    border-radius: 0 !important;
    min-height: 100vh;
  }
  .drawer,
  .product-drawer,
  .side-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
  }
}
/* === end MOBILE-RESPONSIVE-SWEEP-v1 === */
