/* Modal Scroll Enhancement CSS */
/* Additional CSS to ensure modal scrolling works properly */

/* Custom scrollbar styling for modal content */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(55, 65, 81, 0.1);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

/* Firefox scrollbar styling */
.modal-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.5) rgba(55, 65, 81, 0.1);
}

/* Ensure modal content is scrollable */
.modal-scroll-container {
    max-height: calc(85vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px; /* Space for scrollbar */
}

/* Mobile responsive modal scrolling */
@media (max-width: 768px) {
    .modal-scroll-container {
        max-height: calc(90vh - 100px);
    }
}

/* Smooth scrolling behavior */
.modal-scroll-container {
    scroll-behavior: smooth;
}

/* Ensure modal doesn't break on small screens */
@media (max-height: 600px) {
    .modal-scroll-container {
        max-height: calc(80vh - 80px);
    }
}

/* Additional scroll indicators */
.modal-scroll-gradient-top {
    position: sticky;
    top: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(28, 35, 51, 1) 0%, rgba(28, 35, 51, 0) 100%);
    z-index: 10;
    pointer-events: none;
}

.modal-scroll-gradient-bottom {
    position: sticky;
    bottom: 0;
    height: 20px;
    background: linear-gradient(to top, rgba(28, 35, 51, 1) 0%, rgba(28, 35, 51, 0) 100%);
    z-index: 10;
    pointer-events: none;
}

/* Ensure touch scrolling works on mobile */
.modal-scroll-container {
    -webkit-overflow-scrolling: touch;
}

/* Prevent horizontal scrolling in modal */
.modal-container {
    overflow-x: hidden;
}

/* Enhanced modal backdrop to prevent body scrolling */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 50;
    overflow: hidden;
}

/* Modal positioning and scrolling */
.modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Modal content styling */
.modal-content-container {
    position: relative;
    background: #1C2333;
    border: 1px solid #374151;
    border-radius: 16px;
    max-width: 672px; /* max-w-2xl */
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Modal header - fixed */
.modal-header {
    position: sticky;
    top: 0;
    background: #1C2333;
    z-index: 20;
    border-bottom: 1px solid rgba(55, 65, 81, 0.3);
    padding: 24px 24px 16px 24px;
}

/* Modal footer - if any */
.modal-footer {
    position: sticky;
    bottom: 0;
    background: #1C2333;
    z-index: 20;
    border-top: 1px solid rgba(55, 65, 81, 0.3);
    padding: 16px 24px 24px 24px;
}

/* Additional utility classes */
.scroll-smooth {
    scroll-behavior: smooth;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
