﻿/* Mobile-first responsive hardening for legacy Razor pages */

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

/* Users menu responsive improvements */
.users-filter-control {
  min-width: 140px;
}

@media (max-width: 767.98px) {
  .btn.float-right {
    float: none !important;
    width: 100%;
    margin-right: 0 !important;
    margin-bottom: .5rem;
  }

    .btn.float-right + .btn.float-right {
      margin-top: 0;
    }

  .card[style*="min-height:600px"] {
    min-height: auto !important;
  }

  .form-control,
  .form-select,
  .select2-container,
  .select2-container .selection,
  .select2-container .select2-selection,
  .users-filter-control {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
  }

  .btn-group,
  .dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
  }

    .dt-buttons .btn,
    .dt-buttons a,
    .dt-buttons button {
      margin-left: 0 !important;
    }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    font-size: .875rem;
  }

  .mobile-report-page .row {
    margin-left: 0;
    margin-right: 0;
  }

    .mobile-report-page .row > [class*="col-"] {
      padding-left: 0;
      padding-right: 0;
      margin-bottom: .75rem;
    }

  .mobile-report-page .mobile-actions,
  .mobile-report-page .mobile-actions .col-12 {
    display: flex;
    flex-direction: column;
    gap: .5rem;
  }

    .mobile-report-page .mobile-actions .btn-print,
    .mobile-report-page .mobile-actions .btn-pdf,
    .mobile-report-page .mobile-actions .btn-excel,
    .mobile-report-page .mobile-actions .btn-crear,
    .mobile-report-page .mobile-actions .btn,
    .mobile-report-page .mobile-actions button,
    .mobile-report-page .mobile-actions a {
      width: 100%;
      margin: 0 !important;
      text-align: center;
      justify-content: center;
    }

  .mobile-report-page .mobile-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

    .mobile-report-page .mobile-table-wrap .table,
    .mobile-report-page .mobile-table-wrap .tabla-datos {
      min-width: 680px;
    }

  .mobile-report-page .select2-container {
    width: 100% !important;
  }

  .admin-customers-page .card-header .row {
    row-gap: .5rem;
  }

  .admin-customers-page #printBtn,
  .admin-customers-page .col-auto {
    width: 100%;
  }

    .admin-customers-page #printBtn .btn-print,
    .admin-customers-page .col-auto .btn-crear {
      width: 100%;
      display: inline-flex;
      justify-content: center;
    }

  .admin-config-page .d-flex.justify-content-end {
    flex-direction: column;
    align-items: stretch !important;
  }

    .admin-config-page .d-flex.justify-content-end .btn {
      width: 100%;
      margin-right: 0 !important;
    }

  .machine-positions-page #machineSelect,
  .item-positions-page #customerSelect,
  .item-positions-page #movementSelect,
  .item-positions-page #groupingSelect {
    width: 100% !important;
    margin: 0 0 .5rem 0 !important;
  }

  .item-positions-page .filters-inline {
    display: block !important;
  }

  .chart-report-page .chart-panel {
    width: 100% !important;
  }

  .chart-report-page .chart-canvas-wrap {
    padding-left: 0;
    padding-right: 0;
  }

    .chart-report-page .chart-canvas-wrap canvas {
      max-height: 320px;
    }

  .chart-report-page .chart-container {
    position: relative;
    width: 100%;
    min-height: 420px;
  }

  @media (max-width: 767.98px) {
    .chart-report-page .chart-container {
      min-height: 400px;
    }
  }
  }
