/**
 * Sidebar Dropdown Specific Fix CSS
 * This CSS specifically targets sidebar dropdowns for all user types
 */

/* Make sidebar dropdown buttons explicitly clickable */
.sidenav .nav-dropdown > button {
    cursor: pointer !important;
    position: relative !important;
    z-index: 10 !important;
    user-select: none !important;
}

/* Style sidebar dropdown arrows */
.sidenav .nav-dropdown > button .dropdown-arrow {
    transition: transform 0.3s ease !important;
    pointer-events: none !important;
    transform-origin: center !important;
}

/* Rotate sidebar dropdown arrow when .rotate-180 class is present */
.sidenav .nav-dropdown > button .dropdown-arrow.rotate-180 {
    transform: rotate(180deg) !important;
}

/* Ensure sidebar dropdown content visibility when active */
.sidenav .nav-dropdown > button.active + .dropdown-content,
.sidenav .nav-dropdown > button.bg-gray-100 + .dropdown-content,
.sidenav .nav-dropdown > button.text-gray-900 + .dropdown-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 50 !important;
}

/* Hide sidebar dropdown content when not active */
.sidenav .nav-dropdown > button:not(.active):not(.bg-gray-100):not(.text-gray-900) + .dropdown-content {
    display: none !important;
}

/* Admin sidebar specific fixes */
.admin-sidebar .nav-dropdown > button .dropdown-arrow {
    transition: transform 0.3s ease !important;
}

/* Rotate admin sidebar dropdown arrow when .rotate-180 class is present */
.admin-sidebar .nav-dropdown > button .dropdown-arrow.rotate-180 {
    transform: rotate(180deg) !important;
}

.admin-sidebar .nav-dropdown > button.active + .dropdown-content,
.admin-sidebar .nav-dropdown > button.bg-gray-100 + .dropdown-content,
.admin-sidebar .nav-dropdown > button.text-gray-900 + .dropdown-content {
    display: block !important;
}

/* User sidebar specific fixes */
.user-sidebar .nav-dropdown > button .dropdown-arrow {
    transition: transform 0.3s ease !important;
}

/* Rotate user sidebar dropdown arrow when .rotate-180 class is present */
.user-sidebar .nav-dropdown > button .dropdown-arrow.rotate-180 {
    transform: rotate(180deg) !important;
}

.user-sidebar .nav-dropdown > button.active + .dropdown-content,
.user-sidebar .nav-dropdown > button.bg-gray-100 + .dropdown-content,
.user-sidebar .nav-dropdown > button.text-gray-900 + .dropdown-content {
    display: block !important;
}

/* Insurance sidebar specific fixes */
.insurance-sidebar .nav-dropdown > button .dropdown-arrow {
    transition: transform 0.3s ease !important;
}

/* Rotate insurance sidebar dropdown arrow when .rotate-180 class is present */
.insurance-sidebar .nav-dropdown > button .dropdown-arrow.rotate-180 {
    transform: rotate(180deg) !important;
}

.insurance-sidebar .nav-dropdown > button.active + .dropdown-content,
.insurance-sidebar .nav-dropdown > button.bg-gray-100 + .dropdown-content,
.insurance-sidebar .nav-dropdown > button.text-gray-900 + .dropdown-content {
    display: block !important;
}

/* CropInsights sidebar specific fixes */
.cropinsights-sidebar .nav-dropdown > button .dropdown-arrow {
    transition: transform 0.3s ease !important;
}

/* Rotate cropinsights sidebar dropdown arrow when .rotate-180 class is present */
.cropinsights-sidebar .nav-dropdown > button .dropdown-arrow.rotate-180 {
    transform: rotate(180deg) !important;
}

.cropinsights-sidebar .nav-dropdown > button.active + .dropdown-content,
.cropinsights-sidebar .nav-dropdown > button.bg-gray-100 + .dropdown-content,
.cropinsights-sidebar .nav-dropdown > button.text-gray-900 + .dropdown-content {
    display: block !important;
}
