/*
 * 嵌入專用頁面樣式（resources/views/embed/dep.blade.php）
 * 獨立於前台 theme.css：不依賴 AdminLTE / Bootstrap，檔案小、載入快
 * 使用系統字型（不載入網頁字型），以免拖慢嵌入的網站
 */
:root {
  --brand: #1d4e89;
  --text: #1f2937;
  --muted: #64748b;
  --border: #e5e9f0;
  --hover: #f5f8fd;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #fff; }
body {
  font-family: -apple-system, "Segoe UI", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

/* 公告清單：日期欄 + 內容欄 */
.embed-list { list-style: none; margin: 0; padding: 0; }
.embed-list li + li { border-top: 1px solid var(--border); }
.embed-item {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: .7rem .8rem; color: inherit; text-decoration: none;
  transition: background .15s;
}
.embed-item:hover, .embed-item:focus-visible { background: var(--hover); outline: none; }
.embed-item:hover .embed-title { color: var(--brand); }

/* 日期：固定寬度，數字等寬，讓清單整齊對齊 */
.embed-date {
  flex: 0 0 3.2rem; text-align: center; padding-top: .1rem;
  color: var(--brand); font-variant-numeric: tabular-nums;
}
.embed-date b { display: block; font-size: .95rem; font-weight: 700; }

.embed-main { flex: 1; min-width: 0; }
/* 標題最多兩行，超過以「…」截斷（完整標題在連結的 title 屬性） */
.embed-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; word-break: break-word;
  font-weight: 500; line-height: 1.45;
}
.embed-meta { display: block; margin-top: .15rem; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 重要程度標籤 */
.embed-tag { display: inline-block; margin-right: .3rem; padding: 0 .4rem; border-radius: 4px; font-size: .72rem; font-weight: 700; line-height: 1.6; vertical-align: 1px; }
.embed-tag.is-imp1 { background: #fdecea; color: #c0392b; }
.embed-tag.is-imp2 { background: #fff4e0; color: #9a5b00; }

.embed-empty { margin: 0; padding: 2rem 1rem; text-align: center; color: var(--muted); }

/* 頁尾：總數與查看全部 */
.embed-foot {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  padding: .6rem .8rem; border-top: 1px solid var(--border); font-size: .8rem; color: var(--muted);
}
.embed-foot a { color: var(--brand); font-weight: 600; text-decoration: none; }
.embed-foot a:hover { text-decoration: underline; }

/* 窄版（例如網站側欄）：日期縮小 */
@media (max-width: 360px) {
  .embed-item { gap: .6rem; padding: .6rem; }
  .embed-date { flex-basis: 2.6rem; }
  body { font-size: 14px; }
}
