/* 修改 mkdocs-material 的 Grid Card 背景顏色 */
.grid.cards li {
    background-color: #ecfbf1; /* 你想要的背景顏色 */
}

/* 設定標題的樣式，讓左邊有一條紅線，背景色為淺灰色 */
.md-typeset h1, 
.md-typeset h2, 
.md-typeset h3, 
.md-typeset h4, 
.md-typeset h5, 
.md-typeset h6 {
    position: relative;
    background-color: #f5f5f5; /* 淺灰色背景 */
    padding-left: 20px; /* 增加左邊的內距，讓紅線更突出 */
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.md-typeset h1::before, 
.md-typeset h2::before, 
.md-typeset h3::before, 
.md-typeset h4::before, 
.md-typeset h5::before, 
.md-typeset h6::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px; /* 紅線的寬度 */
    background-color: #ff0000; /* 紅色 */
}

/* 可以根據需要調整 margin 的數值 */
.md-typeset a.md-button {
    margin: 4px;
    padding: 4px 8px;
}

/* .md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
    padding: 4px 4px;
    margin: 4px 4px;
} */

/* table {
    width: auto;  
    font-size: 12px; 
    line-height: 1.0;
}

table th {
    padding: 2px 2px;  
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

table td {
    padding: 2px 2px;  
    text-align: left;
    white-space: nowrap; 
}

table, th, td {
    border: 1px solid #ddd;
    border-collapse: collapse;  
} */


/* table {
    width: 100%;
    table-layout: fixed;
}

table th:nth-child(1), table td:nth-child(1) {
    width: 90px; 
}

.md-typeset table:not([class]) {
    display: table;
} */

/* 

table {
    width: auto;  
    font-size: 12px; 
    line-height: 1.0;
}

th, td {
    border: 1px solid var(--md-typeset-table-color);
    border-spacing: 0;
    border-bottom: none;
    border-left: none;
    border-top: none;
    width: auto;
}
*/

.md-typeset__table {
    line-height: 1;
    width: auto;
}

.md-typeset__table table:not([class]) {
    font-size: .74rem;
    border: 1px solid black;
}

.md-typeset__table table:not([class]) td,
.md-typeset__table table:not([class]) th {
    padding: 5px;
    border: 1px solid gray;
    min-width: 30px;
}

.md-typeset__table tr:nth-child(2n) {
    background-color: #f8f8f8;
}

[data-md-color-scheme="slate"] .md-typeset__table tr:nth-child(2n) {
    background-color: hsla(var(--md-hue),25%,25%,1)
} 


/* 底下的設定是為了不讓 content 上捲時， Nav Bar 跟著向上移動一點點 */

/* 隱藏 Nav Bar 的 title */
.md-nav__title {
    display: none;
}

/* 設定 md-main__inner 的 margin 和 padding 為 0 */
.md-main__inner.md-grid {
    margin-top: 0 !important;
    /* padding: 0 !important; */
}

/* 隱藏 div.mermaid 的原始文字 */
div.mermaid {
    color:transparent;
}

/* 修正 inline <code> 裡面的 css，凸顯他的顯示 */
.md-typeset code:not(pre code) {
    /* font-family: "Courier New", Consolas, monospace; 改字體 */
    font-family: "JetBrains Mono", "Source Code Pro", Consolas, Menlo, monospace;
    font-size: 1em;   
    color: red;
    background-color: #f0f0f0;  /* 底色淡粉紅 (可選) */
    /* font-weight: bold;      */
    padding: 0.1em 0.25em; /* 讓字不會太擠 */
    border-radius: 3px;    /* 圓角 */
}

/* 讓 admonition 裡的文字恢復正常字體大小 */
.md-typeset .admonition,
.md-typeset details {
  font-size: 1em;  /* 預設正文大小 */
}


/* 條文 */
.law-row {padding:8px 0; overflow:hidden; display:block;}
.law-row:last-child{border-bottom:none;}
.law-row:hover{color:#000;}
.law-row > .col-no{float:left;width:8em;white-space:nowrap;padding-right:8px;line-height: 170%;text-align:right;margin-right: 1em;}
.law-row > .col-fun{float:left;width:12em;white-space:nowrap;padding-right:8px;line-height: 170%;}
.law-row > .col-fun2 {float: left;width: 19em;white-space: nowrap;padding-right: 8px;line-height: 170%;}
.law-row > .col-data{float:none;width:auto;/*width:78%;*//*overflow:hidden;*/overflow:auto; padding-right:0;}/*自動縮放寬度*/
.law-row > .col-data > .text-danger{padding-left: 2em;}

/* 沿革 */
.law-history .row {border-bottom:1px dotted #367979;}
.btnNowOrHistory {float:left; margin-right:40px;}

/* 司法解釋 */
.jud-content .row {margin-bottom:0.3em; display:block;}
.jud-content .row .col-th {float:left; width:5em; margin:0px;padding:0;text-align: right; white-space:nowrap;}
.jud-content .row .col-td {float:none;width:auto; /*margin-left: 5em;*/margin-left: 4.3em;}/*自動縮放寬度*/
/*.jud-content .row .col-td .fa {display:inline;}*/
.jud-content .text-pre {/*margin-left: 5.3em;*/margin-left: 4.3em;}
.jud-extent {width:60%;	margin:0 auto;}
.jud-extent .row {margin-bottom:0.3em; display:block;}
.jud-extent .row .col-th {float:left; width:5em; margin:0px;padding:0;text-align: right; white-space:nowrap;}
.jud-extent .row .col-td {float:none;width:auto; /*margin-left: 5em;*/margin-left: 4.3em;}/*自動縮放寬度*/
/*.jud-extent .row .col-td .fa {display:inline;}*/
.jud-extent .text-pre {margin-left: 5.3em;}
.jud-extent .text-ex {width:100%; margin:0 0 0 -.6em;}

/* 加入個人資料夾 */
/* .folder-menu {position: absolute;z-index: 2;width: 18em;padding: 0.5em 1em;background-color: #dfedff;border: solid 1px #1358b6;box-shadow: 4px 4px 4px #aabdd6; right:0;}
.folder-menu ul{margin: 0 0 1em 0;padding: 0;list-style-type: none;white-space: nowrap;max-height: 16em;overflow-y: auto;background-color:#FFF;padding:0.5em;}
.folder-menu label {font-weight:normal; margin-bottom: 5px;}
.folder-menu li:hover{background-color:#f8f8f8;}
.folder-menu .input-group-btn{font-size:initial !important;}
.folder-menu .input-group-btn .btn-default{font-size:1.5rem;}
.folder-menu-buttons{padding:0 0 8px 0;}
.folder-menu-buttons hr {margin: 0.5em 0;} */

/* 編輯資料夾 */
/* .folder-editarea a.btn {
	display: inline-block !important;
	color:#333 !important;
	font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
	background-color: #fff;
    border-color: #ccc;
}
.folder-editarea a:hover.btn {background-color:#FFF; border-color:#148383;color:#333 !important;} */


/* 去32個整段的條文樣式 */
.law-article {counter-reset: num;padding-left: 2em;width:90%;}
.law-article + .ValidContent {margin-left: 2em;}
.law-article div {position: relative;margin-bottom: 0.5em;}
.law-article div.show-number::before {counter-increment: num;content: counter(num);display: inline-block;position: absolute;left: -3em;margin-left: -1em;text-align: right;width: 3em;font-family: Consolas;font-size:1.05em;font-style:italic;color:#666;}
.law-article div.show-number.long-width::before {left: -5em;}
.law-article .lawno-style {background-color: #f5f5f5;border-radius: 4px;padding: 2px;font-family: "微軟正黑體";font-weight: 800;font-size: 12px;color: #0560d0;}
.law-article .style-error{color:#990000;background-color:#fcb6b6;}


/* 🔹 控制區：改成直排 */

#controls {
  position: fixed;
  right: 10px;
  bottom: 10px;
}

#controls {
  display: flex;
  flex-direction: column;   /* 🔥 直排 */
  gap: 12px;
  align-items: flex-start;
}

/* =========================
   🔹 共用：初始狀態（outline）
========================= */
.ctrl-btn {
  width: 56px;
  height: 56px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  background: #f5f5f5;      /* 淺色 */
  border: 2px solid #ccc;   /* 有顏色邊框 */
  color: #555;

  cursor: pointer;
  transition: all 0.2s ease;
}

/* hover */
.ctrl-btn:hover {
  background: #eaeaea;
}


/* 🔹 icon 大小 */
.material-symbols-outlined {
  font-size: 28px;
}


/* =========================
   ▶️ PLAY 狀態
========================= */
#playBtn.playing {
  background: #4caf50;
  border-color: #4caf50;
  color: white;
}

#playBtn.paused {
  background: #ff9800;
  border-color: #ff9800;
  color: white;
}

/* =========================
   ⏹️ STOP（實心）
========================= */
#stopBtn.active {
  background: #e53935;
  border-color: #e53935;
  color: white;
}

/* =========================
   🔁 LOOP（柔和版）
========================= */
/* 🔁 OFF（預設） */
/* #loopBtn {
  background: #f5f5f5;
  color: #777;
  border-color: #55a555;
  box-shadow: none;
} */

/* 🔥 ON */
#loopBtn.active {
  background: #66bb6a;
  border-color: #66bb6a;
  color: white;
}

/* hover（PC 用） */
/* #loopBtn:hover {
  background: #eaeaea;
} */



h1, h2, h3 {
  cursor: pointer;
}

.md-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e3f2fd;
  color: #0d47a1;
  font-size: 0.75rem;
  text-decoration: none;
}