/* F2 文件下載 */
.f2dt {
	--f2dt-bg: #fff;
	background: var(--f2dt-bg);
	color: var(--f2vc-text);
	padding: 72px 0 90px;
}
.f2dt [hidden] { display: none !important; }

/* 分頁籤 */
.f2dt-tabs {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: 32px;
}
.f2dt-tab {
	margin: 0 -1px 0 0;
	padding: 14px 20px;
	font: inherit;
	font-size: 18px;
	line-height: 1.85;
	color: var(--f2vc-accent);
	background: #fff;
	border: 1px solid var(--f2vc-accent);
	border-radius: 0;
	cursor: pointer;
	transition: background .2s, color .2s;
}
.f2dt-tab:hover { background: #eaf6ff; }
.f2dt-tab.is-active { background: var(--f2vc-accent); color: #fff; }
.f2dt-tab:focus-visible { outline: 2px solid #0071bd; outline-offset: 2px; }

/* 工具列 */
.f2dt-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 20px;
	margin-bottom: 20px;
}
.f2dt-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.f2dt-cat {
	padding: 6px 16px;
	font: inherit;
	font-size: 15px;
	line-height: 1.6;
	color: #333;
	background: #f2f2f2;
	border: 1px solid #f2f2f2;
	border-radius: 999px;
	cursor: pointer;
	transition: all .2s;
}
.f2dt-cat:hover { border-color: var(--f2vc-accent); color: var(--f2vc-accent); }
.f2dt-cat.is-active { background: var(--f2vc-accent); border-color: var(--f2vc-accent); color: #fff; }

.f2dt-tools { display: flex; gap: 10px; flex-wrap: wrap; }
.f2dt-year,
.f2dt-search {
	height: 40px;
	box-sizing: border-box;
	padding: 0 12px;
	font: inherit;
	font-size: 15px;
	color: #333;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
}
.f2dt-year { padding-right: 32px; -webkit-appearance: none; appearance: none;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23333' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; }
.f2dt-search { width: 220px; }
.f2dt-year:focus,
.f2dt-search:focus { outline: none; border-color: var(--f2vc-accent); box-shadow: 0 0 0 3px rgba(0, 153, 255, .15); }

/* 表格 */
.f2dt-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15.75px;
	line-height: 1.85;
}
.f2dt-table th,
.f2dt-table td {
	padding: 8px;
	text-align: left;
	vertical-align: middle;
}
.f2dt-table thead th {
	font-weight: 700;
	background: #eee;
	border-bottom: 1px solid #ddd;
}
.f2dt-table tbody tr + tr td { border-top: 1px solid #ddd; }
.f2dt-table tbody tr:hover td { background: #f7fbff; }
.f2dt-c-date  { width: 15%; white-space: nowrap; }
.f2dt-c-cat   { width: 15%; }
.f2dt-c-file  { width: 12%; text-align: center !important; }

.f2dt-file {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 4px;
	color: #e03b2f;
	transition: background .2s, transform .2s;
}
.f2dt-file:hover { background: #fdeceb; transform: translateY(-1px); }
.f2dt-file--doc  { color: #2b5797; }
.f2dt-file--doc:hover  { background: #e8eef8; }
.f2dt-file--xls  { color: #1e7145; }
.f2dt-file--ppt  { color: #c4502a; }
.f2dt-file--zip  { color: #6b6b6b; }
.f2dt-file--link { color: var(--f2vc-accent); }
.f2dt-file--link:hover { background: #eaf6ff; }

.f2dt-empty { padding: 30px 0; text-align: center; color: var(--f2vc-body); }
.f2dt-notice { padding: 16px 20px; background: #fff8e1; border-left: 4px solid #f0b400; font-size: 15px; }
.f2dt-more-wrap { text-align: center; margin-top: 36px; }

/* TablePress 後備輸出 */
.f2dt-fallback .tablepress { width: 100%; border-collapse: collapse; font-size: 15.75px; }
.f2dt-fallback .tablepress th { background: #eee; border-bottom: 1px solid #ddd; padding: 8px; text-align: left; }
.f2dt-fallback .tablepress td { border-top: 1px solid #ddd; padding: 8px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* 手機：每列變卡片 */
@media (max-width: 767px) {
	.f2dt { padding: 50px 0 60px; }
	.f2dt-toolbar { flex-direction: column; align-items: stretch; }
	.f2dt-tools { display: grid; grid-template-columns: auto 1fr; }
	.f2dt-search { width: 100%; }
	.f2dt-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
	.f2dt-table,
	.f2dt-table tbody,
	.f2dt-table tr,
	.f2dt-table td { display: block; width: auto; }
	.f2dt-table tbody tr {
		position: relative;
		padding: 14px 56px 14px 0;
		border-top: 1px solid #ddd;
	}
	.f2dt-table tbody tr:first-child { border-top: 0; }
	.f2dt-table tbody tr + tr td { border-top: 0; }
	.f2dt-table td { padding: 0; }
	.f2dt-table .f2dt-c-date,
	.f2dt-table .f2dt-c-cat { display: inline; font-size: 14px; color: #777; }
	.f2dt-table .f2dt-c-cat::before { content: "・"; }
	.f2dt-table .f2dt-c-title { margin-top: 4px; font-weight: 700; line-height: 1.6; }
	.f2dt-table .f2dt-c-file { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
	.f2dt-table tbody tr:hover td { background: none; }
}
