/* NocoDB Dropdown Styles */
.nocodb-dropdown {
    position: relative;
    display: inline-block;
}

.nocodb-dropdown-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.nocodb-dropdown-toggle .dropdown-arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.nocodb-dropdown-toggle:hover .dropdown-arrow,
.nocodb-dropdown.open .nocodb-dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
}

.nocodb-dropdown-content {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 12150;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.nocodb-dropdown.open .nocodb-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.nocodb-dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.nocodb-dropdown-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.nocodb-dropdown-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.nocodb-dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* Mobile NocoDB Section */
.mobile-nocodb-section {
    border-top: 1px solid #e0e0e0;
    margin-top: 8px;
    padding-top: 8px;
}

.mobile-nocodb-section .nocodb-header {
    font-weight: bold;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 4px;
    color: #495057;
    font-size: 14px;
    padding: 10px 16px;
}

.mobile-nocodb-section .nocodb-subitem {
    padding: 8px 16px 8px 32px;
    background-color: #fdfdfd;
    border-left: 3px solid #007bff;
    margin: 2px 0;
    border-radius: 0 4px 4px 0;
    transition: all 0.2s ease;
}

.mobile-nocodb-section .nocodb-subitem:hover {
    background-color: #e3f2fd;
    border-left-color: #0056b3;
}

.mobile-nocodb-section .nocodb-subitem a {
    font-size: 14px;
    font-weight: 500;
    display: block;
    width: 100%;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .nocodb-dropdown-content {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .nocodb-dropdown-item {
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .nocodb-dropdown-item:hover {
        background-color: #4a5568;
        color: #90cdf4;
    }
    
    .mobile-nocodb-section {
        border-color: #4a5568;
    }
    
    .mobile-nocodb-section .nocodb-header {
        background-color: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .mobile-nocodb-section .nocodb-subitem {
        background-color: #2d3748;
        border-left-color: #90cdf4;
    }
    
    .mobile-nocodb-section .nocodb-subitem:hover {
        background-color: #4a5568;
        border-left-color: #63b3ed;
    }
    
    .mobile-nocodb-section .nocodb-subitem a {
        color: #e2e8f0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nocodb-dropdown {
        display: none; /* Hide on mobile, use mobile section instead */
    }
}
