/* Marsilia — Article data tables */

:root {
	--mrslia-table-primary: #3358d3;
	--mrslia-table-accent: #1d91d8;
	--mrslia-table-head: #1e3a8a;
	--mrslia-table-text: #1e293b;
	--mrslia-table-muted: #64748b;
	--mrslia-table-border: #dbeafe;
	--mrslia-table-row-alt: #f8fbff;
	--mrslia-table-shadow: 0 14px 34px rgba(51, 88, 211, 0.1);
}

.entry-content .mrslia-table-wrap,
.elementor-widget-container .mrslia-table-wrap {
	margin: 1.75rem 0 2rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: 16px;
	border: 1px solid var(--mrslia-table-border);
	box-shadow: var(--mrslia-table-shadow);
	background: #ffffff;
	direction: rtl;
}

.entry-content table.mrslia-article-table,
.elementor-widget-container table.mrslia-article-table {
	width: 100%;
	min-width: 520px;
	border-collapse: separate;
	border-spacing: 0;
	margin: 0 !important;
	font-size: 0.95rem;
	line-height: 1.65;
	color: var(--mrslia-table-text);
}

.entry-content table.mrslia-article-table thead,
.elementor-widget-container table.mrslia-article-table thead {
	background: linear-gradient(135deg, var(--mrslia-table-head) 0%, var(--mrslia-table-primary) 100%);
}

.entry-content table.mrslia-article-table thead th,
.elementor-widget-container table.mrslia-article-table thead th {
	padding: 0.9rem 1rem;
	text-align: right;
	font-weight: 700;
	color: #ffffff;
	border: none;
	white-space: nowrap;
}

.entry-content table.mrslia-article-table thead th:first-child,
.elementor-widget-container table.mrslia-article-table thead th:first-child {
	border-top-right-radius: 15px;
}

.entry-content table.mrslia-article-table thead th:last-child,
.elementor-widget-container table.mrslia-article-table thead th:last-child {
	border-top-left-radius: 15px;
}

.entry-content table.mrslia-article-table tbody td,
.entry-content table.mrslia-article-table tbody th,
.elementor-widget-container table.mrslia-article-table tbody td,
.elementor-widget-container table.mrslia-article-table tbody th {
	padding: 0.8rem 1rem;
	text-align: right;
	vertical-align: top;
	border-bottom: 1px solid #e8eef8;
	border-left: none;
	border-right: none;
}

.entry-content table.mrslia-article-table tbody tr:nth-child(even),
.elementor-widget-container table.mrslia-article-table tbody tr:nth-child(even) {
	background: var(--mrslia-table-row-alt);
}

.entry-content table.mrslia-article-table tbody tr:hover,
.elementor-widget-container table.mrslia-article-table tbody tr:hover {
	background: #eff6ff;
}

.entry-content table.mrslia-article-table tbody tr:last-child td,
.elementor-widget-container table.mrslia-article-table tbody tr:last-child td {
	border-bottom: none;
}

.entry-content table.mrslia-article-table tbody tr:last-child td:first-child,
.elementor-widget-container table.mrslia-article-table tbody tr:last-child td:first-child {
	border-bottom-right-radius: 15px;
}

.entry-content table.mrslia-article-table tbody tr:last-child td:last-child,
.elementor-widget-container table.mrslia-article-table tbody tr:last-child td:last-child {
	border-bottom-left-radius: 15px;
}

.entry-content table.mrslia-article-table td strong,
.entry-content table.mrslia-article-table th strong,
.elementor-widget-container table.mrslia-article-table td strong,
.elementor-widget-container table.mrslia-article-table th strong {
	color: #0f172a;
}

/* Tables without thead — style first row as header */
.entry-content table.mrslia-article-table:not(:has(thead)) tbody > tr:first-child,
.elementor-widget-container table.mrslia-article-table:not(:has(thead)) tbody > tr:first-child {
	background: linear-gradient(135deg, var(--mrslia-table-head) 0%, var(--mrslia-table-primary) 100%);
}

.entry-content table.mrslia-article-table:not(:has(thead)) tbody > tr:first-child td,
.entry-content table.mrslia-article-table:not(:has(thead)) tbody > tr:first-child th,
.elementor-widget-container table.mrslia-article-table:not(:has(thead)) tbody > tr:first-child td,
.elementor-widget-container table.mrslia-article-table:not(:has(thead)) tbody > tr:first-child th {
	color: #ffffff;
	font-weight: 700;
	border-bottom: none;
}

@media (max-width: 640px) {
	.entry-content table.mrslia-article-table,
	.elementor-widget-container table.mrslia-article-table {
		min-width: 480px;
		font-size: 0.88rem;
	}

	.entry-content table.mrslia-article-table thead th,
	.entry-content table.mrslia-article-table tbody td,
	.elementor-widget-container table.mrslia-article-table thead th,
	.elementor-widget-container table.mrslia-article-table tbody td {
		padding: 0.7rem 0.75rem;
	}
}
