/**
 * Table Styles - Simple and Clean
 * @package Blog Content
 */

/* Desktop Tables */
.entry-content table,
.author-page-content table,
table {
	width: 100%;
	margin: 30px 0;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid #ddd;
}

/* Table Header - White text on Blue background */
.entry-content table thead,
.author-page-content table thead,
table thead {
	background: #007BFF;
}

.entry-content table thead th,
.author-page-content table thead th,
table thead th {
	padding: 15px;
	text-align: left;
	font-weight: 700;
	color: #FFFFFF;
	border: 1px solid #0056B3;
}

/* Table Caption - h3 style */
.entry-content table caption,
.author-page-content table caption,
table caption {
	padding: 16px 0;
	text-align: left;
	font-weight: 700;
	font-size: 1.5rem;
	line-height: 1.35;
	color: #000;
	caption-side: top;
	font-family: var(--heading-font);
	margin-bottom: 10px;
}

/* Table Body */
.entry-content table tbody td,
.author-page-content table tbody td,
table tbody td {
	padding: 15px;
	border: 1px solid #ddd;
	color: #333;
}

.entry-content table tbody tr:nth-child(even),
.author-page-content table tbody tr:nth-child(even),
table tbody tr:nth-child(even) {
	background: #f9f9f9;
}

.entry-content table tbody tr:hover,
.author-page-content table tbody tr:hover,
table tbody tr:hover {
	background: #f0f8ff;
}

/* Links in tables */
.entry-content table a,
.author-page-content table a,
table a {
	color: #007BFF;
	text-decoration: none;
}

.entry-content table a:hover,
.author-page-content table a:hover,
table a:hover {
	text-decoration: underline;
}

/* Mobile - Stack vertically */
@media (max-width: 768px) {
	
	.entry-content table,
	.author-page-content table,
	table {
		border: 0;
		width: 100%;
		margin: 0 auto;
	}
	
	/* Remove outer margin and padding for table-enhanced on mobile */
	.entry-content table.table-enhanced,
	.author-page-content table.table-enhanced,
	table.table-enhanced {
		margin: 0 auto !important;
		padding: 0 !important;
	}
	
	.entry-content table thead,
	.author-page-content table thead,
	table thead {
		display: none;
	}
	
	.entry-content table,
	.entry-content table tbody,
	.entry-content table tr,
	.entry-content table td,
	.author-page-content table,
	.author-page-content table tbody,
	.author-page-content table tr,
	.author-page-content table td,
	table,
	table tbody,
	table tr,
	table td {
		display: block;
		width: 100%;
	}
	
	.entry-content table tr,
	.author-page-content table tr,
	table tr {
		margin-bottom: 20px;
		border: 1px solid #ddd;
		background: #fff;
	}
	
	.entry-content table td,
	.author-page-content table td,
	table td {
		text-align: left;
		padding: 15px;
		border-bottom: 1px solid #eee;
	}
	
	.entry-content table td:last-child,
	.author-page-content table td:last-child,
	table td:last-child {
		border-bottom: 0;
	}
	
	/* First cell as header - White on Blue */
	.entry-content table td:first-child,
	.author-page-content table td:first-child,
	table td:first-child {
		background: #007BFF;
		color: #FFFFFF;
		font-weight: 700;
	}
	
	/* If using data-label attribute */
	.entry-content table td[data-label]:not(:first-child)::before,
	.author-page-content table td[data-label]:not(:first-child)::before,
	table td[data-label]:not(:first-child)::before {
		content: attr(data-label);
		display: block;
		font-weight: 700;
		color: #007BFF;
		margin-bottom: 5px;
		font-size: 0.85em;
	}
	
}
