/* Emergency Footer Language Dropdown Fix - Direct CSS injection */

/* Target the dropdown with multiple selectors to ensure it works */
.footer-language-dropdown,
div.footer-language-dropdown,
.footer-language-selector .footer-language-dropdown,
.footer-language-selector div[x-show],
footer .footer-language-dropdown {
    /* Force remove ALL height restrictions */
    height: auto !important;
    min-height: 0 !important;
    max-height: 400px !important;
    
    /* Ensure scrolling works */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    
    /* ULTRA HIGH z-index to stay above EVERYTHING */
    z-index: 2147483647 !important;
    
    /* Position adjustments for downward opening */
    position: absolute !important;
    top: 100% !important;
    margin-top: 0.75rem !important;
}

/* Override Tailwind's h-40 class if it's still being applied */
.h-40.footer-language-dropdown {
    height: auto !important;
}

/* Ensure the dropdown content area has no restrictions */
.footer-language-dropdown > div,
.footer-language-dropdown ul,
.footer-language-dropdown .grid {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

/* Make sure each language item is visible */
.footer-language-dropdown li {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure parent containers don't cut off the dropdown */
.footer-language-selector,
footer .col-span-full,
footer > div,
footer {
    overflow: visible !important;
    z-index: auto !important;
}

/* Override the custom-container overflow for footer only */
footer.custom-container,
footer .custom-container {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
}

/* Create proper stacking context for the language selector */
.footer-language-selector {
    position: relative !important;
    z-index: 9999 !important;
}

/* Fix for any overlapping elements in footer */
footer * {
    position: relative;
    z-index: 1;
}

/* Ensure dropdown button itself has proper z-index */
.footer-language-selector button,
.footer-language-selector [x-data] {
    position: relative !important;
    z-index: 9998 !important;
}

/* Dark mode support */
.dark .footer-language-dropdown {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
}

/* Custom scrollbar for the dropdown */
.footer-language-dropdown::-webkit-scrollbar {
    width: 6px;
}

.footer-language-dropdown::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.footer-language-dropdown::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.footer-language-dropdown::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Dark mode scrollbar */
.dark .footer-language-dropdown::-webkit-scrollbar-track {
    background: #374151;
}

.dark .footer-language-dropdown::-webkit-scrollbar-thumb {
    background: #4b5563;
}

.dark .footer-language-dropdown::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}