/* =============================================================================
   Advanced Notice Board for Elementor — Frontend Styles
   Version: 1.0.0
   ============================================================================= */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.anb-notice-board-wrap {
	font-family: inherit;
	width: 100%;
}

/* ── Filter Bar ───────────────────────────────────────────────────────────── */
.anb-filter-bar {
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.anb-cat-filter {
	appearance: none;
	-webkit-appearance: none;
	padding: 9px 36px 9px 14px;
	border: 1.5px solid #dde3f0;
	border-radius: 6px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 12px center;
	background-size: 14px;
	font-size: 14px;
	color: #333;
	cursor: pointer;
	min-width: 180px;
	transition: border-color 0.2s;
	line-height: 1.5;
}

.anb-cat-filter:focus {
	outline: none;
	border-color: #1e3a5f;
	box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}

/* ── Table Wrapper (for overflow + shadow) ────────────────────────────────── */
.anb-table-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: 8px;
	box-shadow: 0 2px 16px rgba(30, 58, 95, 0.08);
}

/* ── Table ────────────────────────────────────────────────────────────────── */
.anb-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	table-layout: auto;
	min-width: 480px;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.anb-table thead tr {
	position: sticky;
	top: 0;
	z-index: 2;
}

.anb-table thead th {
	background-color: #1e3a5f;
	color: #fff;
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 14px 16px;
	text-align: left;
	border: 1px solid rgba(255, 255, 255, 0.12);
	white-space: nowrap;
}

.anb-table thead th:first-child {
	border-radius: 8px 0 0 0;
}

.anb-table thead th:last-child {
	border-radius: 0 8px 0 0;
}

/* ── Column Widths ────────────────────────────────────────────────────────── */
.anb-col-sl       { width: 52px; text-align: center; }
.anb-col-date     { width: 115px; white-space: nowrap; }
.anb-col-notice   { width: auto; }
.anb-col-download { width: 130px; text-align: center; }

/* ── Body Rows ────────────────────────────────────────────────────────────── */
.anb-table tbody tr {
	background-color: #fff;
	transition: background-color 0.18s ease, transform 0.12s ease;
}

.anb-table tbody tr:nth-child(even) {
	background-color: #f4f7fb;
}

.anb-table tbody tr:hover {
	background-color: #e8f0fe;
	transform: translateX(1px);
}

.anb-table tbody td {
	padding: 12px 16px;
	border: 1px solid #dde3f0;
	color: #333;
	vertical-align: middle;
	line-height: 1.5;
}

.anb-col-sl {
	font-weight: 600;
	color: #888;
	font-size: 12px;
}

/* ── Title with Icon ──────────────────────────────────────────────────────── */
.anb-title-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}

.anb-file-icon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	opacity: 0.6;
}

.anb-icon-pdf   { color: #e74c3c; opacity: 1; }
.anb-icon-image { color: #27ae60; opacity: 1; }
.anb-icon-doc   { color: #2980b9; opacity: 1; }
.anb-icon-zip   { color: #f39c12; opacity: 1; }

.anb-notice-title {
	color: #1e3a5f;
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-color: rgba(30, 58, 95, 0.35);
	font-weight: 500;
	transition: color 0.18s ease, text-decoration-color 0.18s ease;
	cursor: pointer;
	word-break: break-word;
}

.anb-notice-title:hover {
	color: #e74c3c;
	text-decoration-color: rgba(231, 76, 60, 0.5);
}

.anb-notice-title.anb-no-link {
	text-decoration: none;
	cursor: default;
	color: inherit;
}

/* ── Download Button ──────────────────────────────────────────────────────── */
.anb-download-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 7px 14px;
	background-color: #1e3a5f;
	color: #fff !important;
	font-size: 13px;
	font-weight: 500;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	text-decoration: none !important;
	transition: background-color 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
	white-space: nowrap;
	line-height: 1;
}

.anb-download-btn:hover {
	background-color: #e74c3c;
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(231, 76, 60, 0.28);
}

.anb-download-btn:active {
	transform: translateY(0);
}

.anb-btn-icon {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

/* ── No File Placeholder ──────────────────────────────────────────────────── */
.anb-no-file {
	color: #bbb;
	font-size: 18px;
	display: block;
	text-align: center;
}

/* ── No Results ───────────────────────────────────────────────────────────── */
.anb-no-results td {
	text-align: center;
	color: #999;
	font-style: italic;
	padding: 32px 16px;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
.anb-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 18px;
	flex-wrap: wrap;
}

.anb-page-btn {
	padding: 8px 18px;
	border: 1.5px solid #dde3f0;
	border-radius: 6px;
	background: #fff;
	color: #333;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.18s ease;
	line-height: 1;
}

.anb-page-btn:hover:not(:disabled) {
	background: #1e3a5f;
	color: #fff;
	border-color: #1e3a5f;
}

.anb-page-btn:disabled {
	opacity: 0.38;
	cursor: not-allowed;
}

.anb-page-btn.active {
	background-color: #1e3a5f;
	color: #fff;
	border-color: #1e3a5f;
}

.anb-page-info {
	font-size: 13px;
	color: #666;
	min-width: 100px;
	text-align: center;
}

/* ── Loading State ────────────────────────────────────────────────────────── */
.anb-loading {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity 0.2s;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media screen and (max-width: 640px) {
	.anb-table-wrap {
		border-radius: 6px;
	}

	.anb-table thead th {
		font-size: 11px;
		padding: 10px 10px;
	}

	.anb-table tbody td {
		padding: 10px 10px;
		font-size: 13px;
	}

	.anb-download-btn {
		font-size: 12px;
		padding: 6px 10px;
		gap: 4px;
	}

	.anb-btn-icon {
		width: 12px;
		height: 12px;
	}

	.anb-filter-bar {
		flex-direction: column;
		align-items: flex-start;
	}

	.anb-cat-filter {
		width: 100%;
	}

	.anb-pagination {
		gap: 6px;
	}

	.anb-page-btn {
		padding: 7px 12px;
		font-size: 13px;
	}
}

@media screen and (max-width: 400px) {
	.anb-col-sl,
	.anb-col-date {
		display: none;
	}
}

/* ── Print ────────────────────────────────────────────────────────────────── */
@media print {
	.anb-download-btn,
	.anb-pagination,
	.anb-filter-bar {
		display: none;
	}

	.anb-table {
		border: 1px solid #ccc;
	}

	.anb-table th,
	.anb-table td {
		border: 1px solid #ccc;
	}
}
