/* Orchestra Map – List */

.orchestra-list-wrap {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	position: relative;
	color: var(--om-popup-text-color, #444);
}
.orchestra-list-wrap *,
.orchestra-list-wrap *::before,
.orchestra-list-wrap *::after {
	box-sizing: border-box;
}

/* ---- Search Row ---- */
.om-list-search-wrap {
	margin-bottom: 12px;
}
.om-list-search-wrap--bottom {
	margin-top: 12px;
	margin-bottom: 0;
}
.om-list-search {
	width: 100%;
	padding: 10px 16px;
	font-size: 1rem;
	font-family: inherit;
	border: 2px solid var(--om-search-border, #e54400);
	border-radius: 8px;
	outline: none;
	background: var(--om-search-bg, #f9f9fb);
	transition: border-color .2s;
}
.om-list-search:focus {
	border-color: var(--om-search-focus-border, #136ea3);
}

/* ---- Table Container ---- */
.om-list-table-wrap {
	margin-top:10px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: 8px;
	border: 1px solid var(--om-list-border, #f0c8be);
	box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* ---- Table ---- */
.om-list-table {
	width: 100%;
	min-width: 400px;
	border-collapse: collapse;
	font-size: inherit;
	font-family: inherit;
	background: #fff;
	table-layout: auto;   /* browser distributes widths based on content */
}

/* Header row */
.om-list-table thead tr {
	background: var(--om-list-header-bg, var(--om-panel-bg, #f9f9fb));
	border-bottom: 2px solid var(--om-list-border, #f0c8be);
}
.om-list-table th {
	padding: 10px 14px;
	text-align: left;
	font-weight: 600;
	font-family: inherit;
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
	overflow: hidden;
	transition: background .15s;
	color: var(--om-popup-heading-color, #212326);
}
.om-list-table th:hover {
	background: var(--om-list-row-hover, #fff1ec);
}
.om-sort-icon {
	font-size: .72em;
	margin-left: 4px;
	opacity: 1;
	vertical-align: middle;
}
.om-sort-inactive {
	opacity: .25;
}

/* Data cells */
.om-list-table tbody tr {
	border-bottom: 1px solid #f2f3f5;
	transition: background .1s;
	cursor: pointer;
}
.om-list-table tbody tr:last-child { border-bottom: none; }
.om-list-table tbody tr:nth-child(even) { background: var(--om-list-row-stripe, #f9f9fb); }
.om-list-table tbody tr:hover { background: var(--om-list-row-hover, #fff1ec); }
.om-list-row--active {
	background: var(--om-list-row-active, #fee8e0) !important;
	border-left: 3px solid var(--om-marker-color, #e54400);
}
.om-list-table td {
	padding: 9px 14px;
	color: var(--om-popup-text-color, #444);
	font-family: inherit;
	vertical-align: middle;
}

/* First column (Name): bold, may wrap */
.om-list-table th:first-child,
.om-list-table td:first-child {
	font-weight: 500;
}

/* Link-type columns: as narrow as possible (chip content determines width) */
.om-list-table th.om-col-url,
.om-list-table td.om-col-url,
.om-list-table th.om-col-email,
.om-list-table td.om-col-email,
.om-list-table th.om-col-tel,
.om-list-table td.om-col-tel {
	width: 1%;
	white-space: nowrap;
}

/* Limit long text fields so they don't push out other columns */
.om-list-table td.om-col-textarea {
	max-width: 280px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.om-list-table td a {
	color: var(--om-panel-link, #136ea3);
	text-decoration: none;
}
.om-list-table td a:hover {
	text-decoration: underline;
}

/* Link cells: compact chip style */
.om-list-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 4px;
	border: 1px solid var(--om-list-border, #f0c8be);
	background: var(--om-panel-bg, #f9f9fb);
	color: var(--om-panel-link, #136ea3) !important;
	font-size: .82em;
	white-space: nowrap;
	text-decoration: none !important;
	transition: background .15s, border-color .15s;
}
.om-list-link:hover {
	background: var(--om-list-row-active, #fee8e0);
	border-color: var(--om-marker-color, #e54400);
}

/* ---- Click Indicator (Chevron) ---- */
.om-list-row {
	position: relative;
}
.om-list-row::after {
	content: '›';
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%) rotate(0deg);
	font-size: .85rem;
	color: var(--om-popup-text-color, #aaa);
	transition: transform .2s;
	pointer-events: none;
}
.om-list-row--active::after,
.om-list-row:has(+ .om-list-row-detail.open)::after {
	transform: translateY(-50%) rotate(90deg);
}

/* ---- Accordion Detail Row ---- */
.om-list-row-detail {
	display: none;
}
.om-list-row-detail.open {
	display: table-row;
}
.om-list-row-detail td {
	padding: 0 !important;
	background: var(--om-panel-bg, #f9f9fb);
	border-bottom: 2px solid var(--om-list-border, #f0c8be) !important;
}
/* prevent striping from bleeding into detail rows */
.om-list-table tbody tr.om-list-row-detail,
.om-list-table tbody tr.om-list-row-detail:nth-child(even) {
	background: transparent !important;
}

.om-detail-inner {
	padding: 16px 20px 20px;
	border-top: 1px solid var(--om-list-border, #f0c8be);
}
.om-detail-inner p {
	margin: 4px 0;
	font-size: .9rem;
	color: var(--om-popup-text-color, #333);
	line-height: 1.45;
}
.om-detail-addr {
	margin-bottom: 8px !important;
}
.om-detail-inner a {
	color: var(--om-panel-link, #136ea3);
	text-decoration: none;
}
.om-detail-inner a:hover { text-decoration: underline; }

.om-list-empty {
	text-align: center;
	padding: 24px !important;
	color: #999;
	font-style: italic;
}

/* ---- Counter ---- */
.om-list-count {
	margin: 6px;
	font-size: .78rem;
	background: var(--om-list-header-bg, var(--om-panel-bg, #f9f9fb));
	text-align: right;
}

/* ---- Pagination ---- */
.om-list-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
	justify-content: center;
	margin-top: 14px;
}
.om-page-btn {
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	border: 1px solid var(--om-list-border, #f0c8be);
	border-radius: 6px;
	background: var(--om-search-bg, #f9f9fb);
	color: var(--om-popup-heading-color, #212326);
	font-size: .9rem;
	font-family: inherit;
	cursor: pointer;
	transition: background .15s, border-color .15s;
}
.om-page-btn:hover:not([disabled]) {
	background: var(--om-list-row-active, #fee8e0);
	border-color: var(--om-marker-color, #e54400);
}
.om-page-btn.active {
	background: var(--om-marker-color, #e54400);
	border-color: var(--om-marker-color, #e54400);
	color: #fff;
	font-weight: 700;
}
.om-page-btn[disabled] {
	opacity: .3;
	cursor: default;
}
.om-page-ellipsis {
	line-height: 34px;
	color: #bbb;
	padding: 0 2px;
}

/* ---- Mobile: Card Layout ---- */
@media (max-width: 600px) {
	.om-list-table,
	.om-list-table thead,
	.om-list-table tbody,
	.om-list-table th,
	.om-list-table td,
	.om-list-table tr {
		display: block;
	}
	.om-list-table thead { display: none; }
	.om-list-table tbody tr {
		margin-bottom: 10px;
		border: 1px solid var(--om-list-border, #f0c8be);
		border-radius: 8px;
		padding: 10px 14px;
		background: #fff;
	}
	.om-list-table td {
		overflow: visible;
		white-space: normal;
		text-overflow: unset;
		max-width: none;
		padding: 3px 0;
	}
	.om-list-table td::before {
		content: attr(data-label) ": ";
		font-weight: 600;
		color: var(--om-popup-heading-color, #212326);
		margin-right: 4px;
	}
	.om-list-table td:first-child {
		font-size: 1rem;
		font-weight: 700;
		margin-bottom: 4px;
	}
	.om-list-table td:first-child::before,
	.om-list-table td[data-label=""]::before { display: none; }

	/* Accordion row in card layout */
	.om-list-row-detail { display: none !important; }
	.om-list-row-detail.open {
		display: block !important;
		margin-top: -10px;
		margin-bottom: 10px;
		border: 1px solid var(--om-list-border, #f0c8be);
		border-top: none;
		border-radius: 0 0 8px 8px;
		border-left: 3px solid var(--om-marker-color, #e54400);
		background: var(--om-panel-bg, #f9f9fb);
	}
	.om-list-row-detail.open td {
		border: none !important;
		border-radius: 0 0 8px 8px;
	}
	.om-list-row::after { display: none; }
}
