/* DBHRMS Public List — shared styles for 7 entity listing shortcodes */

/* ── Filter bar ──────────────────────────────────────────────────────────── */

.dbhrms-list-wrap {
	font-family: inherit;
	color: var(--dbhrms-text, #2d3748);
}

.dbhrms-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 18px;
	padding: 16px;
	background: var(--dbhrms-card-bg, #fff);
	border: 1px solid var(--dbhrms-border, #e2e8f0);
	border-radius: var(--dbhrms-radius, 12px);
	box-shadow: var(--dbhrms-shadow, 0 2px 12px rgba(0,0,0,.08));
}

.dbhrms-filter-bar .dbhrms-select,
.dbhrms-filter-bar .dbhrms-input {
	flex: 1;
	min-width: 160px;
}

.dbhrms-filter-bar .dbhrms-input {
	min-width: 220px;
}

/* ── Status ──────────────────────────────────────────────────────────────── */

.dbhrms-list-status {
	min-height: 1.4em;
	color: var(--dbhrms-muted, #718096);
	font-size: .9rem;
	margin: 0 0 10px;
}

/* ── Table ───────────────────────────────────────────────────────────────── */

.dbhrms-list-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--dbhrms-border, #e2e8f0);
	border-radius: var(--dbhrms-radius, 12px);
	box-shadow: var(--dbhrms-shadow, 0 2px 12px rgba(0,0,0,.08));
}

.dbhrms-list-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .9rem;
}

.dbhrms-list-table thead {
	background: var(--dbhrms-primary, #1a4f7a);
	color: #fff;
	position: sticky;
	top: 0;
}

.dbhrms-list-table thead th {
	padding: 11px 14px;
	text-align: left;
	font-weight: 600;
	font-size: .82rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	white-space: nowrap;
}

.dbhrms-list-table tbody tr {
	border-bottom: 1px solid var(--dbhrms-border, #e2e8f0);
	transition: background .12s;
}

.dbhrms-list-table tbody tr:last-child {
	border-bottom: none;
}

.dbhrms-list-table tbody tr:hover {
	background: var(--dbhrms-bg, #f8f9fa);
}

.dbhrms-list-table tbody td {
	padding: 10px 14px;
	vertical-align: top;
	line-height: 1.45;
}

.dbhrms-list-table tbody td:first-child {
	font-weight: 600;
	color: var(--dbhrms-primary, #1a4f7a);
}

/* ── Pagination ──────────────────────────────────────────────────────────── */

.dbhrms-list-pagination {
	margin-top: 16px;
}

.dbhrms-list-pagination .dbhrms-pagination {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.dbhrms-page-info {
	font-size: .875rem;
	color: var(--dbhrms-muted, #718096);
}

/* ── Nikaya accordion ────────────────────────────────────────────────────── */

.dbhrms-nikaya-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.dbhrms-nikaya-item {
	background: var(--dbhrms-card-bg, #fff);
	border: 1px solid var(--dbhrms-border, #e2e8f0);
	border-radius: var(--dbhrms-radius, 12px);
	box-shadow: var(--dbhrms-shadow, 0 2px 12px rgba(0,0,0,.08));
	overflow: hidden;
}

.dbhrms-nikaya-header {
	background: var(--dbhrms-primary, #1a4f7a);
	color: #fff;
	padding: 12px 18px;
	display: flex;
	align-items: center;
	gap: 16px;
}

.dbhrms-nikaya-name {
	font-weight: 700;
	font-size: 1.05rem;
}

.dbhrms-nikaya-maha {
	font-size: .85rem;
	opacity: .85;
}

.dbhrms-parshawa-list {
	list-style: none;
	margin: 0;
	padding: 10px 18px 12px;
}

.dbhrms-parshawa-list li {
	padding: 6px 0;
	border-bottom: 1px solid var(--dbhrms-border, #e2e8f0);
	font-size: .9rem;
}

.dbhrms-parshawa-list li:last-child {
	border-bottom: none;
}

.dbhrms-parshawa-name {
	font-weight: 600;
	color: var(--dbhrms-text, #2d3748);
}

.dbhrms-parshawa-himi {
	color: var(--dbhrms-muted, #718096);
}

/* ── Export button row ───────────────────────────────────────────────────── */

.dbhrms-export-row {
	margin-top: 14px;
	display: flex;
	justify-content: flex-end;
}

.dbhrms-btn-export {
	background: var(--dbhrms-accent, #e8a015);
	color: #fff;
	border: none;
}

.dbhrms-btn-export:hover { opacity: .88; }

/* ── Export modal ────────────────────────────────────────────────────────── */

.dbhrms-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.55);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.dbhrms-modal-overlay.is-open {
	display: flex;
}

.dbhrms-modal-box {
	background: #fff;
	border-radius: var(--dbhrms-radius, 12px);
	box-shadow: 0 12px 48px rgba(0,0,0,.22);
	padding: 32px 28px 24px;
	width: 100%;
	max-width: 480px;
	position: relative;
	max-height: 90vh;
	overflow-y: auto;
}

.dbhrms-modal-close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: var(--dbhrms-muted, #718096);
	line-height: 1;
	padding: 4px 8px;
}

.dbhrms-modal-close:hover { color: var(--dbhrms-text, #2d3748); }

.dbhrms-modal-title {
	margin: 0 0 8px;
	font-size: 1.2rem;
	color: var(--dbhrms-primary, #1a4f7a);
}

.dbhrms-modal-intro {
	font-size: .9rem;
	color: var(--dbhrms-muted, #718096);
	margin: 0 0 20px;
}

.dbhrms-field-group {
	margin-bottom: 16px;
}

.dbhrms-field-group label {
	display: block;
	font-size: .85rem;
	font-weight: 600;
	color: var(--dbhrms-text, #2d3748);
	margin-bottom: 5px;
}

.dbhrms-field-group label span { color: #c53030; }

.dbhrms-field-group .dbhrms-input {
	width: 100%;
	box-sizing: border-box;
}

.dbhrms-field-group.has-error .dbhrms-input {
	border-color: #fc8181;
}

.dbhrms-field-error {
	display: block;
	color: #c53030;
	font-size: .8rem;
	margin-top: 4px;
	min-height: 1.1em;
}

/* ── Format selector ─────────────────────────────────────────────────────── */

.dbhrms-format-options {
	display: flex;
	gap: 10px;
	margin-top: 6px;
}

.dbhrms-format-option {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	flex: 1;
	padding: 10px 12px;
	border: 2px solid var(--dbhrms-border, #e2e8f0);
	border-radius: 8px;
	cursor: pointer;
	transition: border-color .15s;
}

.dbhrms-format-option:has(input:checked) {
	border-color: var(--dbhrms-primary, #1a4f7a);
	background: #f0f6ff;
}

.dbhrms-format-option input[type="radio"] {
	margin-top: 3px;
	accent-color: var(--dbhrms-primary, #1a4f7a);
	flex-shrink: 0;
}

.dbhrms-format-label {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: .88rem;
}

.dbhrms-format-label small {
	color: var(--dbhrms-muted, #718096);
	font-size: .78rem;
}

.dbhrms-modal-privacy {
	font-size: .78rem;
	color: var(--dbhrms-muted, #718096);
	border: 1px solid var(--dbhrms-border, #e2e8f0);
	border-radius: 6px;
	padding: 10px 12px;
	margin: 18px 0 20px;
	line-height: 1.5;
}

.dbhrms-modal-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.dbhrms-export-status {
	min-height: 1.4em;
	font-size: .9rem;
	margin: 10px 0 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
	.dbhrms-filter-bar .dbhrms-select,
	.dbhrms-filter-bar .dbhrms-input {
		min-width: 100%;
	}

	.dbhrms-list-table thead {
		display: none;
	}

	.dbhrms-list-table tbody tr {
		display: block;
		padding: 10px 14px;
		border-bottom: 2px solid var(--dbhrms-border, #e2e8f0);
	}

	.dbhrms-list-table tbody td {
		display: flex;
		justify-content: space-between;
		padding: 4px 0;
		font-size: .85rem;
	}

	.dbhrms-list-table tbody td::before {
		content: attr(data-label);
		font-weight: 600;
		color: var(--dbhrms-muted, #718096);
		font-size: .78rem;
		text-transform: uppercase;
		letter-spacing: .04em;
		margin-right: 8px;
		flex-shrink: 0;
	}
}
