/* ================================================================
   PICKER SHELL - Reusable Modal Container
   Mobile fullscreen pattern extracted from BoulderModal
   ================================================================ */

/* ----------------------------------------------------------------
   BASE MODAL STYLES
   ---------------------------------------------------------------- */

.picker-shell-modal .modal-content {
  background: #212529;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.picker-shell-modal .modal-dialog {
  max-width: 900px;
}

/* ----------------------------------------------------------------
   HEADER
   ---------------------------------------------------------------- */

.picker-shell-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(33, 37, 41, 0.95);
}

.picker-shell-header .modal-title {
  flex: 1;
  color: #f8f9fa;
  font-size: 18px;
  font-family: "DINBold", sans-serif;
  margin: 0;
}

.picker-shell-header .btn-header-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  color: #f8f9fa;
  cursor: pointer;
  transition: all 0.2s ease;
}

.picker-shell-header .btn-header-back:hover {
  background: rgba(255, 255, 255, 0.2);
}

.picker-shell-header .btn-header-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: #f8f9fa;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.picker-shell-header .btn-header-close:hover {
  color: #ff6b6b;
}

/* ----------------------------------------------------------------
   BODY
   ---------------------------------------------------------------- */

.picker-shell-body {
  padding: 0;
  min-height: 400px;
  max-height: 70vh;
  overflow: hidden;
}

/* ----------------------------------------------------------------
   FOOTER
   ---------------------------------------------------------------- */

.picker-shell-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(33, 37, 41, 0.95);
}

.picker-shell-footer .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ----------------------------------------------------------------
   MOBILE FULLSCREEN
   Replicates BoulderModal pattern for consistent mobile experience
   ---------------------------------------------------------------- */

@media (max-width: 767px) {
  /* Fullscreen modal on mobile */
  .picker-shell-modal.fullscreen-mobile.modal {
    padding: 0 !important;
    z-index: 100500 !important; /* Higher than mobile menu */
  }

  .picker-shell-modal.fullscreen-mobile .modal-dialog {
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
  }

  .picker-shell-modal.fullscreen-mobile .modal-content {
    height: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important; /* Dynamic viewport height for mobile browsers */
    width: 100vw !important;
    border-radius: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .picker-shell-modal.fullscreen-mobile .modal-body {
    flex: 1 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .picker-shell-modal.fullscreen-mobile .picker-shell-body {
    max-height: none;
    min-height: auto;
  }

  /* Backdrop z-index for fullscreen modals */
  .picker-shell-modal.fullscreen-mobile ~ .modal-backdrop {
    z-index: 100050;
  }

  /* General mobile adjustments */
  .picker-shell-body {
    min-height: 350px;
    max-height: 65vh;
  }

  .picker-shell-footer {
    flex-wrap: wrap;
    gap: 8px;
  }

  .picker-shell-footer .btn {
    flex: 1;
    min-width: 100px;
  }

  .picker-shell-footer .btn-outline-danger {
    flex: 0 0 auto;
  }
}

/* ----------------------------------------------------------------
   PICKER ACTIVE STATE
   Hides footer when MediaPicker is shown
   ---------------------------------------------------------------- */

.picker-shell-modal.picker-active .picker-shell-footer {
  display: none;
}
