// assets/styles/FormBottomSheet.scss

body.filters-open {
  overflow: hidden !important;
}

.bottom-filters-bar {
  display: none !important;
}

.bottom-filters-bar .btn {
  display: block;
  width: 100%;
  height: 48px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.bottom-sheet-mobile-backdrop {
  display: none !important;
}

[data-bottom-sheet] .bottom-sheet-handle,
[data-bottom-sheet] .bottom-sheet-header {
  display: none !important;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon i {
  font-size: 16px;
  line-height: 1;
}

@media (min-width: 992px) {
  .bottom-filters-bar {
    display: none !important;
  }

  .bottom-sheet-mobile-backdrop {
    display: none !important;
  }

  [data-bottom-sheet][data-bottom-sheet-panel] {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    box-shadow: none !important;
  }

  [data-bottom-sheet] .bottom-sheet-handle,
  [data-bottom-sheet] .bottom-sheet-header {
    display: none !important;
  }

  .bottom-sheet-actions-sticky {
    position: static !important;
    bottom: auto !important;
    z-index: auto !important;
    background: transparent !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-top: 0 !important;
  }
}

@media (max-width: 991.98px) {
  body {
    padding-bottom: 88px !important;
  }

  .bottom-filters-bar {
    display: block !important;
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    z-index: 9999 !important;
    margin: 0 !important;
  }

  .bottom-filters-bar .btn {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  }

  [data-bottom-sheet][data-bottom-sheet-panel] {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 11 !important;

    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;

    margin: 0 !important;
    border-radius: 1.25rem 1.25rem 0 0 !important;
    background: #fff !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18) !important;

    transform: translateY(110%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;

    transition:
            transform 0.3s ease,
            opacity 0.25s ease,
            visibility 0.25s ease !important;

    padding-bottom: 65px !important;
  }

  [data-bottom-sheet][data-bottom-sheet-panel].is-open {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .bottom-sheet-mobile-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.4) !important;
    z-index: 2 !important;

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;

    transition: opacity 0.25s ease, visibility 0.25s ease !important;
  }

  .bottom-sheet-mobile-backdrop.open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  [data-bottom-sheet] .bottom-sheet-handle {
    display: block !important;
    width: 50px;
    height: 5px;
    background: #ccc;
    border-radius: 999px;
    margin: 12px auto;
    flex: 0 0 auto;
  }

  [data-bottom-sheet] .bottom-sheet-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 3;
    background: #fff;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .bottom-sheet-actions-sticky {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #fff;
    padding-top: 0.75rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .bottom-sheet-actions-sticky .btn {
    min-height: 48px;
  }

  #nb_hours_wrapper {
    left: 12px !important;
    right: 12px !important;
    bottom: 80px !important;
    max-width: none !important;
  }

  #nb_hours_wrapper .bg-dark {
    background-color: rgba(0, 0, 0, 0.55) !important;
  }
}