/**
 * 雲太系統 全站共用導覽列樣式
 * 路徑：soft/nav.css
 */

/* ── 第一層子選單動畫 ── */
.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease-in-out;
}

.dropdown-group:hover .dropdown-menu,
.dropdown-group.is-active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ── 第三層子選單（JS 控制 / position:fixed）── */
.submenu-right {
    position: fixed;
    z-index: 10000;
    width: 224px;
    max-height: 348px;
    overflow-y: auto;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    padding: 8px 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

.submenu-right.is-visible {
    display: block;
    opacity: 1;
}

.dropdown-subgroup {
    position: relative;
}

/* ── 第三層選單觸發項高亮鎖定 ── */
/* 強制鎖定第二層項目的背景與文字顏色 */
.dropdown-subgroup .is-active,
.dropdown-subgroup > a.is-active,
.dropdown-subgroup > div.is-active {
    background-color: rgb(219 234 254) !important; /* bg-blue-100 */
    color: rgb(37 99 235) !important; /* text-blue-600 */
}

/* 鎖定項目內的圖示背景與圖示顏色 */
.dropdown-subgroup .is-active div[class*="bg-blue-"],
.dropdown-subgroup .is-active i {
    background-color: rgb(37 99 235) !important; /* bg-blue-600 */
    color: white !important;
}

/* 確保箭頭圖示也維持顏色 (若有) */
.dropdown-subgroup .is-active i[data-lucide="chevron-right"] {
    background-color: transparent !important;
    color: rgb(148 163 184) !important; /* text-slate-400 */
}

/* ── 產品介紹第二層選單取消高度限制，直接顯示全部 ── */
.dropdown-menu-scrollable {
    /* 移除 max-height 讓其自然展開 */
}

/* ── 客製化微型美化捲軸 (全面套用至第二層、第三層與通用選單) ── */
.custom-scrollbar,
.dropdown-menu-scrollable,
.submenu-right {
    scrollbar-width: thin;
    scrollbar-color: #003366 #f1f5f9;
}

.custom-scrollbar::-webkit-scrollbar,
.dropdown-menu-scrollable::-webkit-scrollbar,
.submenu-right::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.custom-scrollbar::-webkit-scrollbar-button,
.dropdown-menu-scrollable::-webkit-scrollbar-button,
.submenu-right::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.custom-scrollbar::-webkit-scrollbar-track,
.dropdown-menu-scrollable::-webkit-scrollbar-track,
.submenu-right::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb,
.dropdown-menu-scrollable::-webkit-scrollbar-thumb,
.submenu-right::-webkit-scrollbar-thumb {
    background: #003366;
    border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover,
.dropdown-menu-scrollable::-webkit-scrollbar-thumb:hover,
.submenu-right::-webkit-scrollbar-thumb:hover {
    background: #002244;
}


