/**
 * Global fast tap + fast focus (iOS / Android / touch)
 * Load last in index.php <head>
 */
html.pp-coarse-pointer {
  -webkit-text-size-adjust: 100%;
}

@media (pointer: coarse), (max-width: 991.98px) {
  body#app,
  body.ppos-login-page,
  .pp-spa-wrapper,
  .modal,
  .app-overlay,
  .content-wrapper,
  .swal2-container {
    -webkit-tap-highlight-color: rgba(0, 123, 255, 0.12);
  }

  /* Scroll/drag areas must not block child inputs */
  .table-responsive input,
  .table-responsive textarea,
  .table-responsive select,
  .table-responsive .form-control,
  .overflow-auto input,
  .overflow-auto textarea,
  .overflow-auto select,
  .overflow-scroll input,
  .overflow-scroll textarea,
  #ppModalBody input,
  #ppModalBody textarea,
  #ppModalBody select,
  #ppModalBody .form-control,
  [style*="overflow-y: auto"] input,
  [style*="overflow-y: auto"] textarea,
  [style*="overflow-y:auto"] input,
  [style*="overflow-y:auto"] textarea {
    -webkit-user-select: text !important;
    user-select: text !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    cursor: text;
  }

  body#app input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
  body#app select,
  body#app textarea,
  body#app .form-control,
  body#app .custom-select,
  body#app .input-dropdown-input,
  body.ppos-login-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]),
  body.ppos-login-page select,
  body.ppos-login-page textarea,
  .pp-spa-wrapper input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]),
  .pp-spa-wrapper select,
  .pp-spa-wrapper textarea,
  .modal input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]),
  .modal select,
  .modal textarea,
  .app-overlay input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
  .app-overlay select,
  .app-overlay textarea,
  .swal2-popup input,
  .swal2-popup textarea,
  .swal2-popup select,
  .swal2-input,
  .swal2-textarea,
  .content-wrapper input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]),
  .content-wrapper textarea,
  .content-wrapper select {
    touch-action: manipulation !important;
    pointer-events: auto !important;
    -webkit-user-select: text !important;
    user-select: text !important;
    font-size: 16px !important;
    line-height: 1.35;
    transition: none !important;
  }

  body#app select,
  body#app select.form-control,
  body#app .pp-native-select-mobile,
  body.ppos-login-page select,
  .pp-spa-wrapper select,
  .modal select,
  .app-overlay select,
  .swal2-popup select {
    cursor: pointer !important;
    -webkit-user-select: auto !important;
    user-select: auto !important;
    min-height: 44px;
    font-size: 16px !important;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  body#app label,
  body.ppos-login-page label,
  .pp-spa-wrapper label,
  .modal label,
  .swal2-popup label {
    touch-action: manipulation;
    cursor: pointer;
  }

  body#app .btn,
  body.ppos-login-page .btn,
  .pp-spa-wrapper .btn,
  .modal .btn,
  .swal2-popup .btn {
    touch-action: manipulation;
    min-height: 44px;
  }

  body#app input:focus,
  body#app textarea:focus,
  body#app select:focus,
  body#app .form-control:focus,
  body.ppos-login-page input:focus,
  body.ppos-login-page textarea:focus,
  .pp-spa-wrapper input:focus,
  .pp-spa-wrapper textarea:focus,
  .pp-spa-wrapper .form-control:focus,
  .swal2-popup input:focus,
  .swal2-popup textarea:focus,
  .swal2-popup select:focus {
    box-shadow: none !important;
    outline: 0;
    border-color: #007bff;
  }

  .input-group > .form-control,
  .input-group > .input-dropdown-wrap,
  .input-group > .custom-select {
    position: relative;
    z-index: auto;
    pointer-events: auto !important;
  }

  .input-dropdown-wrap {
    position: relative;
  }

  .input-dropdown-wrap.pp-dropdown-open-wrap {
    z-index: 11049;
  }

  .input-dropdown-menu.show {
    z-index: 11050 !important;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }

  .dropdown-menu.show {
    z-index: 11050 !important;
  }

  .select2-container--open {
    z-index: 11048 !important;
  }

  .select2-container--bootstrap4 .select2-dropdown {
    z-index: 11051 !important;
  }

  .swal2-container {
    z-index: 12000 !important;
  }

  body.pp-dropdown-open .btn-sticky-bottom,
  body.pp-dropdown-open .sticky-actions,
  body.pp-dropdown-open .logis-drawer-fab,
  body.pp-dropdown-open .fixed-bottom {
    z-index: 900 !important;
  }

  body.pp-dropdown-open .card.pp-dropdown-parent-open,
  body.pp-dropdown-open .logis-card.pp-dropdown-parent-open,
  body.pp-dropdown-open .modal-content.pp-dropdown-parent-open,
  body.pp-dropdown-open .logis-panel.pp-dropdown-parent-open {
    overflow: visible !important;
  }

  body.pp-dropdown-open .content-wrapper,
  body.pp-dropdown-open .card-body {
    overflow: visible;
  }

  .input-group-prepend,
  .input-group-append,
  .input-group-text {
    touch-action: manipulation;
    pointer-events: auto;
  }

  .input-dropdown-wrap,
  .input-dropdown-wrap .form-control,
  .input-dropdown-menu,
  .input-dropdown-item {
    pointer-events: auto !important;
    touch-action: manipulation;
  }

  .select2-container,
  .select2-container--bootstrap4 .select2-selection--single,
  .select2-container--bootstrap4 .select2-selection--multiple {
    touch-action: manipulation !important;
    pointer-events: auto !important;
  }

  .select2-container--bootstrap4 .select2-selection--single,
  .select2-container--bootstrap4 .select2-selection--multiple {
    min-height: 48px !important;
  }

  .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered,
  .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    font-size: 16px !important;
    line-height: 1.35;
  }

  .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 0.35rem;
    width: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .select2-container--bootstrap4 .select2-results__option {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.6rem 0.85rem;
    font-size: 16px;
    touch-action: manipulation;
  }

  #md-payment .select2-container--open {
    z-index: 11052 !important;
  }
}

html.pp-coarse-pointer select.pp-native-select-mobile {
  width: 100%;
  min-height: 48px;
  font-size: 16px !important;
}

html.pp-coarse-pointer select.pp-native-select-mobile[multiple] {
  min-height: 3.25rem;
  padding: 0.35rem 0.5rem;
}
