/* layout-sidebar-style.css */
.wy-side-scroll {
    flex: 1; /* 让此元素占据所有剩余空间 */
    overflow-y: auto; /* 当内容溢出时显示垂直滚动条 */
    min-height: 0;
}

#version-selector {
    width: 100%;
    padding: 6px 12px;
    border: 1px solid #e1e4e5;
    background-color: #fff;
    border-radius: 4px;
    font-size: 14px;
    display: block !important;
    visibility: visible !important;
    gap: 10px;
}
.wy-side-nav-search {
    background-color: #2980B9 !important;
    display: flex;
    flex-direction: column;
    gap: 10px; /* 这里设置间距，可以根据需要调整 */
    margin-top: -1px !important; /* 额外的顶部边距 */
    margin-bottom: 0px !important; /* 移除底部外边距 */
    border-bottom: none !important; /* 移除底部边框 */
}

.selector-dropdown, .wy-side-nav-search input[type="text"] {
    font-family: 'Roboto', Arial, sans-serif;
    color: #666666 !important;
    background: #f0f0f0 !important;
    width: 100% !important;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 12px;
    height: 30px;
    box-sizing: border-box;
    display: block !important;
}

.selector-dropdown {
    padding-right: 30px; /* 为下拉箭头留出空间 */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 移除 Firefox 中的默认下拉箭头 */
.selector-dropdown::-ms-expand {
    display: none;
}

.wy-side-nav-search {/* 目录列表的背景色 */
    background-color: #e5e5e5 !important;
    box-shadow: none !important;
}


.ameba-iot-title {
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    text-align: center;
    background-color: transparent;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1px;
}
.logo-container {
    background-color: transparent; /* 設置背景色為白色 */
    margin-bottom: 0px;
    margin-top: 0px;
    justify-content: center;
    align-items: center;
}

.realtek-logo {
    max-width: 140%; /* 調整 logo 大小，可以根據需要修改 */
    height: auto;
    margin-bottom: 0px;
    margin-top: 0px;
}

/* --- 側邊欄底部使用者面板樣式 (更新版) --- */
#sidebar-user-panel {
    position: relative;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #3a3838;
    border-top: 1px solid #555;
    display: flex;
    align-items: center;
    justify-content: space-between; /* 两端对齐，将button推向两侧 */
    padding: 0 15px;
    box-sizing: border-box;
    z-index: 2100;
    flex-shrink: 0;  /* 防止此面板在空间不足时被压缩 */
}

.user-info-container {
    display: flex;
    align-items: center;
    /* 確保容器不會被擠壓 */
    flex-shrink: 0;
    /* 限制最大寬度，防止使用者名稱過長時推出登出按鈕 */
    max-width: calc(100% - 40px);
}

#sidebar-user-panel .user-icon {
    font-size: 24px;
    color: #e0e0e0;
    cursor: pointer;
    transition: color 0.3s;
}

#sidebar-user-panel .user-icon:hover {
    color: #fff;
}

#sidebar-user-panel #user-status-text {
    font-size: 14px;
    font-family: 'Roboto', Arial, sans-serif;
    color: #d0d0d0;
    margin-left: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-icons-container {
    display: flex;
    align-items: center;
    gap: 15px;         /* 設定圖示之間的間距 */
}

.action-icons-container .sidebar-setting-link:hover i {
    color: #fff;
}

.action-icons-container > a,
.action-icons-container > i {
    font-size: 20px;
    color: #e0e0e0;
    cursor: pointer;
    transition: color 0.3s;
    display: none;
    text-decoration: none;
}

#sidebar-logout-icon:hover {
    color: #ff6b6b;
}

#sidebar-user-panel .dropdown-menu {
    bottom: 100%;
    top: auto;
    left: 0;
    right: auto;
    width: 100%;
    border-radius: 4px 4px 0 0;
    margin-bottom: 5px;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    :root {
        --side-bar-width: 100%; /* 在移动设备上让侧边栏占满宽度 */
    }

    .wy-nav-side {
        width: 100%;
        left: -100%; /* 默认隐藏侧边栏 */
    }
}