/* Global Responsive Overrides for UltimatePOS */
/* Keep changes minimal and theme-friendly; loaded last to override safely */

/* Prevent horizontal scroll on small devices */
html, body {
  overflow-x: hidden;
}

/* Images scale within containers */
img {
  max-width: 100%;
  height: auto;
}

/* Tables: allow horizontal scroll on phones */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
}

/* Form controls should span container width */
.form-control,
.select2,
.select2-container {
  width: 100% !important;
}

.input-group .input-group-addon {
  min-width: 38px;
}

/* Labels should wrap on small screens */
.label,
.badge {
  white-space: normal;
}

/* Content padding and box spacing */
@media (max-width: 767px) {
  .content {
    padding: 10px;
  }
  .box {
    margin-bottom: 12px;
  }
}

/* Content header font-size tuning */
@media (max-width: 991px) {
  .content-header > h1 {
    font-size: 20px;
    line-height: 1.3;
  }
  .content-header > h1 small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
  }
  .box .box-header h3.box-title {
    font-size: 16px;
  }
  .info-box {
    min-height: 70px;
  }
  .info-box-icon {
    width: 60px;
    height: 60px;
    font-size: 28px;
  }
  .info-box-content {
    padding: 6px 8px;
  }
  .small-box h3 {
    font-size: 22px;
  }
}

/* App buttons should stack nicely on phones */
@media (max-width: 767px) {
  .btn-app {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* Modal sizing for mobile */
@media (max-width: 575px) {
  .modal-dialog {
    width: calc(100% - 24px);
    margin: 12px auto;
  }
  .modal-body {
    padding: 10px;
  }
}

/* DataTables: keep cells readable; allow horizontal scroll inside wrapper */
@media (max-width: 767px) {
  table.dataTable thead tr th,
  table.dataTable tbody tr td {
    white-space: nowrap;
  }
}

/* POS-related layout tweaks */
@media (max-width: 767px) {
  .pos-tab-container .col-xs-12 {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ZATCA page specific small-screen improvements */
#portal_mode_banner {
  font-size: 12px;
  line-height: 1.4;
}
#portal_mode_banner strong {
  font-weight: 600;
}
#zatca_settings_form .help-block {
  font-size: 12px;
}