/*================================================================================
	Item Name: Modern Admin - Clean Bootstrap 4 Dashboard HTML Template
	Author: PIXINVENT
	Author URL: http://www.themeforest.net/user/pixinvent
================================================================================

NOTE:
------
PLACE HERE YOUR OWN SCSS CODES AND IF NEEDED, OVERRIDE THE STYLES FROM THE OTHER STYLESHEETS.
WE WILL RELEASE FUTURE UPDATES SO IN ORDER TO NOT OVERWRITE YOUR STYLES IT'S BETTER LIKE THIS.  */

/* Mobile: fixed footer must not block form action buttons */
@media (max-width: 767.98px) {
  /*
   * Theme uses .app-content.center-layout { overflow: hidden; } which can clip / confuse
   * scrolling on small screens. Allow vertical growth.
   */
  .app-content.center-layout {
    overflow-x: hidden;
    overflow-y: visible;
  }

  body.horizontal-layout .app-content {
    padding-bottom: 1.25rem;
  }

  body.horizontal-layout .app-content .content-wrapper {
    padding-bottom: 1rem;
  }

  /*
   * Child z-index cannot sit above a sibling fixed footer in the root stacking context.
   * On small screens, let the footer flow after content so taps always reach form buttons.
   */
  footer.footer.fixed-bottom {
    position: static;
    z-index: auto;
    margin-top: 1.5rem;
    padding-bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px));
  }

  /* WebKit date inputs ignore width without min-width: 0 */
  input[type="date"].form-control,
  input[type="time"].form-control,
  input[type="datetime-local"].form-control {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .form-group.row > [class*="col-md-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .form-group.row > .mx-auto {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /*
   * Sticky action bar: stays tappable after filling the last field (keyboard open / scrolled down).
   */
  .card-body .invoice-form-actions,
  .card-body .card-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 1060;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 0;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    margin-top: 0.75rem;
    margin-bottom: 0;
    border-top: 1px solid #e4e7ed;
    background: #fff;
    box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.1);
  }

  .card-body.has-mobile-form-actions {
    padding-bottom: 0.25rem;
  }

  .card-body .invoice-form-actions .btn,
  .card-body .invoice-form-actions a.btn,
  .card-body .card-form-actions .btn,
  .card-body .card-form-actions a.btn {
    width: 100% !important;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0.5rem;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }
}
