/* Publisher Switcher Menu - Clean Apple-like design */

/* Fixed positioning for the popover */
.publisher-switcher-popover {
    position: fixed !important;
    left: 70px !important;
    top: 1px !important;
    transform: none !important;
    z-index: 1400;
}

.publisher-switcher-menu {
    background: white;
    border-radius: 0 12px 12px 0; /* No rounded corners on left side */
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.dark .publisher-switcher-menu {
    background: rgb(30, 30, 30);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Environment Item Hover States */
.environment-item {
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.environment-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.dark .environment-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Remove Button Styling */
.environment-item .mud-icon-button {
    transition: opacity 0.2s ease;
}

/* Smooth fade in/out for remove button */
.group:hover .group-hover\:opacity-100 {
    transition-delay: 0.1s;
}

/* Menu Items */
.publisher-switcher-menu .mud-menu-item {
    transition: background-color 0.15s ease;
    padding: 8px 16px;
}

.publisher-switcher-menu .mud-menu-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.dark .publisher-switcher-menu .mud-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Avatar Styling */
.publisher-switcher-menu .mud-avatar {
    transition: transform 0.15s ease;
}

.environment-item .mud-avatar:hover {
    transform: scale(1.05);
}

/* Text Styling */
.publisher-switcher-menu .mud-typography {
    letter-spacing: -0.01em;
}

/* Section Dividers */
.publisher-switcher-menu > div:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.dark .publisher-switcher-menu > div:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Icon Styling */
.publisher-switcher-menu .text-gray-500 {
    color: rgba(0, 0, 0, 0.5);
}

.dark .publisher-switcher-menu .text-gray-500 {
    color: rgba(255, 255, 255, 0.5);
}

/* Uppercase Section Headers */
.publisher-switcher-menu .uppercase {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Focus States */
.publisher-switcher-menu .mud-menu-item:focus,
.publisher-switcher-menu .mud-icon-button:focus {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: -2px;
}

/* Cursor Pointer for Interactive Elements */
.cursor-pointer {
    cursor: pointer;
}

/* Search Bar Styling */
.environment-search {
    font-size: 13px;
}

.environment-search .mud-input-root {
    border-radius: 8px;
}

.environment-search .mud-input {
    padding: 6px 12px;
    font-size: 13px;
}

/* Custom Hostname Input Styling */
.custom-hostname-input {
    font-size: 13px;
}

.custom-hostname-input .mud-input-root {
    border-radius: 8px;
}

.custom-hostname-input .mud-input {
    font-size: 13px;
}

.custom-hostname-input .mud-input-adornment {
    cursor: pointer;
}

/* Environment List Scrolling */
.environment-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.dark .environment-list {
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Webkit Scrollbar Styling (Chrome, Safari, Edge) */
.environment-list::-webkit-scrollbar {
    width: 8px;
}

.environment-list::-webkit-scrollbar-track {
    background: transparent;
}

.environment-list::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.dark .environment-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
}

.environment-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.dark .environment-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Animation for Menu Opening */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.publisher-switcher-menu {
    animation: slideIn 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
