/**
 * 雲太系統 全站共用導覽列樣式
 * 路徑：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: calc(100vh - 120px);
    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(239 246 255) !important; /* bg-blue-50 */
    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 */
}
