/* ===== ENHANCED MODAL SCROLLING FOR PORTFOLIO & CLIENT MODALS ===== */
/* Comprehensive creative scrolling fix for large modals */

/* Force flex layout for proper scrolling behavior */
.modal-dialog.modal-large,
.modal.modal-large {
  display: flex !important;
  flex-direction: column !important;
}

.modal-dialog.modal-large .modal-body,
.modal.modal-large .modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: scroll !important;
  scroll-behavior: smooth !important;
}

/* Cross-browser smooth scrolling */
.modal-body {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

/* ===== PREMIUM SCROLLBAR STYLING ===== */
/* Width and appearance */
.modal-body::-webkit-scrollbar {
  width: 12px;
}

/* Track styling */
.modal-body::-webkit-scrollbar-track {
  background: rgba(0, 255, 136, 0.03);
  border-radius: 10px;
  margin: 8px 0;
}

/* Thumb (scrollbar handle) styling */
.modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--kluxe-green) 0%, rgba(0, 255, 150, 0.5) 100%);
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  min-height: 40px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Hover state with enhanced visual feedback */
.modal-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00ff88 0%, var(--kluxe-green) 100%);
  border-color: rgba(0, 255, 136, 0.3);
  box-shadow: 0 0 15px rgba(0, 255, 150, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Active/pressed state */
.modal-body::-webkit-scrollbar-thumb:active {
  background: #00ff88;
  box-shadow: 0 0 20px rgba(0, 255, 150, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ===== FORM SECTIONS IN MODALS ===== */
/* Ensure forms display correctly for scrolling */
.modal-body form {
  display: flex;
  flex-direction: column;
}

.modal-body .form-section {
  flex-shrink: 0;
}

.modal-body .form-section:last-of-type {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: none;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  .modal-body::-webkit-scrollbar {
    width: 10px;
  }

  .modal-body::-webkit-scrollbar-thumb {
    min-height: 35px;
    border-width: 1px;
  }
}

@media (max-width: 480px) {
  .modal-body::-webkit-scrollbar {
    width: 8px;
  }

  .modal-body::-webkit-scrollbar-track {
    margin: 5px 0;
  }

  .modal-body::-webkit-scrollbar-thumb {
    min-height: 30px;
    border-width: 1px;
  }
}
