/**
 * Tutor LMS Dropdown Positioning Fixes - SAFE MINIMAL VERSION
 * 
 * This file provides minimal fixes to ensure dropdown visibility
 * WITHOUT interfering with the library's positioning logic.
 * 
 * Strategy: Only fix what's broken (visibility), leave positioning alone
 */

/* ====================================
   ENSURE DROPDOWN VISIBILITY ONLY
   ==================================== */

/* Fix for dropdown content - ensure it's visible when open */
.rtl-1nnjidj[data-state="open"],
.rtl-1nnjidj:not([data-state="closed"]):not([aria-hidden="true"]) {
    /* Ensure dropdown is visible */
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    
    /* Ensure it's on top */
    z-index: 999999 !important;
    
    /* Keep existing position but ensure it's rendered */
    pointer-events: auto !important;
}

/* Ensure dropdown content is styled properly */
.rtl-1nnjidj {
    /* Basic visibility */
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    
    /* Ensure scrolling works if content is long */
    max-height: 400px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    
    /* Ensure minimum size */
    min-width: 150px !important;
    
    /* Smooth transition */
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
}

/* When dropdown is closed, hide it properly */
.rtl-1nnjidj[data-state="closed"],
.rtl-1nnjidj[aria-hidden="true"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* ====================================
   Z-INDEX MANAGEMENT
   ==================================== */

/* Ensure dropdowns appear above everything */
.rtl-1nnjidj {
    z-index: 999999 !important;
}

/* But below modals if they exist */
.tutor-modal-active .rtl-1nnjidj,
.modal-open .rtl-1nnjidj {
    z-index: 99998 !important;
}

/* ====================================
   SCROLLBAR STYLING (OPTIONAL)
   ==================================== */

.rtl-1nnjidj::-webkit-scrollbar {
    width: 8px;
}

.rtl-1nnjidj::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.rtl-1nnjidj::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.rtl-1nnjidj::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ====================================
   RESPONSIVE ADJUSTMENTS
   ==================================== */

@media (max-width: 768px) {
    .rtl-1nnjidj {
        /* Ensure dropdown fits on mobile screens */
        max-width: calc(100vw - 40px) !important;
    }
}

/* ====================================
   DEBUGGING MODE (OPTIONAL)
   ==================================== */

/* Uncomment to see dropdown boundaries for debugging
.rtl-79elbk {
    outline: 2px solid blue !important;
}

.rtl-w04q8b {
    outline: 2px solid green !important;
}

.rtl-1nnjidj {
    outline: 3px solid red !important;
    background: rgba(255, 0, 0, 0.1) !important;
}
*/

