/* GenieTables — market-data table widget.
   Scoped to .mlsg-gb-table*. Colors inherit gb-tokens; user overrides come
   through Elementor style controls (generated CSS, not inline attributes). */

.mlsg-gb-table-wrap {
	width: 100%;
}

.mlsg-gb-table__caption {
	margin: 0 0 0.75rem 0;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--gb-color-text, #1f2733);
}

/* Horizontal scroll container — never hide columns, never truncate.
   Inherits the widget-container's border-radius and clips so Elementor's
   Advanced > Border (radius / box-shadow) actually applies to the table. */
.mlsg-gb-table__scroll {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	overflow-y: hidden;
	border-radius: inherit;
}

.mlsg-gb-table {
	width: 100%;
	min-width: 640px;
	border-collapse: collapse;
	font-size: 1rem;
}

.mlsg-gb-table th,
.mlsg-gb-table td {
	padding: 0.875rem 1rem;
	border: 1px solid var(--gb-color-border, #e5e7eb);
	vertical-align: middle;
	white-space: nowrap;
}

.mlsg-gb-table thead th {
	background: var(--gb-color-primary, #0f172a);
	color: var(--gb-color-on-primary, #ffffff);
	font-weight: 600;
	text-align: left;
}

.mlsg-gb-table tbody td {
	background: var(--gb-color-surface, #ffffff);
	color: var(--gb-color-text, #1f2733);
}

.mlsg-gb-table--striped tbody tr:nth-child(even) td {
	background: var(--gb-color-surface-alt, #f8fafc);
}

.mlsg-gb-table tbody tr:hover td {
	background: var(--gb-color-surface-hover, #eef2f7);
}

.mlsg-gb-table__cell--left {
	text-align: left;
}

.mlsg-gb-table__cell--center {
	text-align: center;
}

.mlsg-gb-table__cell--right {
	text-align: right;
}

.mlsg-gb-table__th--sortable {
	cursor: pointer;
	user-select: none;
}

.mlsg-gb-table__th--sortable::after {
	content: "\f0dc";
	font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif;
	font-weight: 900;
	margin-left: 0.4em;
	opacity: 0.45;
	font-size: 0.85em;
}

.mlsg-gb-table__th--sortable[aria-sort="ascending"]::after {
	content: "\f0de";
	opacity: 1;
}

.mlsg-gb-table__th--sortable[aria-sort="descending"]::after {
	content: "\f0dd";
	opacity: 1;
}

.mlsg-gb-table__th--sortable:focus-visible {
	outline: 2px solid var(--gb-color-primary, #2563eb);
	outline-offset: -2px;
}

.mlsg-gb-table__link {
	color: var(--gb-color-primary, #b91c1c);
	font-weight: 600;
	text-decoration: none;
}

.mlsg-gb-table__link:hover,
.mlsg-gb-table__link:focus-visible {
	text-decoration: underline;
}

.mlsg-gb-table__footnote {
	margin: 0.75rem 0 0 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--gb-color-text-muted, #64748b);
}

@media (max-width: 640px) {
	.mlsg-gb-table th,
	.mlsg-gb-table td {
		padding: 0.625rem 0.75rem;
	}
}
