﻿/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */
input[readonly],
textarea[readonly],
select[readonly] {
    background-color: #f5f5f5;
    border-color: #ccc;
    cursor: not-allowed;
    color: #555;
}
a.navbar-brand {
  white-space: normal;
  text-align: center;
  word-break: break-all;
}

/* Provide sufficient contrast against white background */
a {
  color: #0366d6;
}

.btn-primary {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  font-size: 14px;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.border-top {
  border-top: 1px solid #e5e5e5;
}
.border-bottom {
  border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
  font-size: 1rem;
  line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  position: relative;
  min-height: 100%;
}

body {
  /* Margin bottom by footer height */
  margin-bottom: 60px;
}
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px; /* Vertically center the text there */
}

#errorToastContainer .toast {
    min-width: 250px;
}

#errorAlertBox {
    position: fixed;
    top: 20px;
    right: 20px;
}



/* --- 動態選單基本樣式 --- */
.nav-menu {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
    background-color: #f4f4f4; /* 主選單背景色 */
    box-shadow: 2px 0 5px rgba(0,0,0,0.1); /* 輕微陰影 */
}

    .nav-menu li {
        position: relative; /* 用於定位子選單 */
    }

    /* 最外層選單項目的底線 */
    .nav-menu > li {
        border-bottom: 1px solid #ddd;
    }

    .nav-menu a {
        display: flex; /* 讓圖示和文字水平對齊 */
        align-items: center;
        text-decoration: none;
        padding: 8px 12px;
        color: #333;
        transition: background-color 0.3s ease, color 0.3s ease; /* 平滑過渡效果 */
        border-bottom: 1px solid #eee; /* 每個連結的底線 */
    }

        .nav-menu a:hover {
            background-color: #e0e0e0;
            color: #007bff; /* Hover 時文字變色 */
        }

    /* 圖示樣式 */
    .nav-menu .menu-icon {
        margin-right: 10px; /* 圖示和文字間距 */
        font-size: 18px; /* 圖示大小 */
        color: #666; /* 圖示顏色 */
    }

    /* 展開/收合箭頭圖示 */
    .nav-menu .toggle-icon {
        margin-left: auto; /* 將箭頭推到最右邊 */
        transition: transform 0.3s ease; /* 旋轉動畫 */
        font-size: 14px;
        color: #999;
    }

    /* --- 子選單樣式 --- */

    .nav-menu ul { /* 所有子選單的通用樣式 (包括 _SubMenu.cshtml 中的 ul) */
        list-style: none;
        padding: 0; /* 子選單內部不縮排，由 li 的 padding-left 控制 */
        margin: 0;
        background-color: #ffffff; /* 子選單背景色可以不同 */
        transition: max-height 0.3s ease-out; /* 平滑展開/收合動畫 */
        box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); /* 輕微陰影區分子選單 */
        display: none; /* 預設隱藏子選單 */
        overflow: hidden; /* 確保內容不會溢出，特別是搭配 max-height 做動畫時 */
    }

        /* 子選單項目增加左邊距，形成階層感 */
        .nav-menu ul li a {
            padding-left: 35px;
            background-color: #fcfcfc; /* 子選單項目背景色 */
            color: #555;
            border-bottom: none; /* 子選單項目之間可能不需要底線 */
        }

            .nav-menu ul li a:hover {
                background-color: #f0f0f0;
            }

    /* 當父 li 擁有 'open' 類別時，顯示子選單 */
    .nav-menu li.open > ul {
        display: block; /* 顯示子選單 */
    }

    /* 當父 li 擁有 'open' 類別時，旋轉箭頭圖示 */
    .nav-menu li.open > .menu-toggler .toggle-icon {
        transform: rotate(180deg); /* 展開時箭頭向上 */
    }

/* 帶有子選單的父選單連結文字加粗 */
.has-submenu > a {
    font-weight: bold;
}