/* =================================
   Table Block Styles
   ================================= */

.wp-block-table {
	margin: 2rem 0;
	overflow-x: auto;
}

.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
}

.wp-block-table thead {
	border-bottom: 2px solid #007ACC;
}

html.dark-theme .wp-block-table thead {
	border-bottom-color: #FDB913;
}

.wp-block-table th {
	background: rgba(0, 122, 204, 0.1);
	font-weight: 600;
	text-align: left;
	padding: 0.75rem 1rem;
	color: #007ACC;
}

html.dark-theme .wp-block-table th {
	background: rgba(253, 185, 19, 0.1);
	color: #FDB913;
}

.wp-block-table td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	color: var(--color-text-primary);
}

html.dark-theme .wp-block-table td {
	border-bottom-color: rgba(255, 255, 255, 0.1);
}

.wp-block-table tbody tr {
	transition: background 0.2s ease;
}

.wp-block-table tbody tr:hover {
	background: rgba(0, 122, 204, 0.05);
}

html.dark-theme .wp-block-table tbody tr:hover {
	background: rgba(253, 185, 19, 0.05);
}

/* Striped style */
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background: rgba(0, 0, 0, 0.02);
}

html.dark-theme .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background: rgba(255, 255, 255, 0.02);
}

.wp-block-table.is-style-stripes tbody tr:nth-child(even) {
	background: transparent;
}

.wp-block-table.is-style-stripes tbody tr:hover {
	background: rgba(0, 122, 204, 0.08);
}

html.dark-theme .wp-block-table.is-style-stripes tbody tr:hover {
	background: rgba(253, 185, 19, 0.08);
}

/* Bordered table */
.wp-block-table table {
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	overflow: hidden;
}

html.dark-theme .wp-block-table table {
	border-color: rgba(255, 255, 255, 0.1);
}

.wp-block-table td,
.wp-block-table th {
	border-right: 1px solid rgba(0, 0, 0, 0.05);
}

html.dark-theme .wp-block-table td,
html.dark-theme .wp-block-table th {
	border-right-color: rgba(255, 255, 255, 0.05);
}

.wp-block-table td:last-child,
.wp-block-table th:last-child {
	border-right: none;
}

/* Fixed layout */
.wp-block-table.is-style-fixed-layout table {
	table-layout: fixed;
}

/* Center aligned content */
.wp-block-table.has-text-align-center td,
.wp-block-table.has-text-align-center th {
	text-align: center;
}

/* Right aligned content */
.wp-block-table.has-text-align-right td,
.wp-block-table.has-text-align-right th {
	text-align: right;
}

/* Caption */
.wp-block-table figcaption {
	margin-top: 0.75rem;
	font-size: 0.875rem;
	color: var(--color-text-secondary);
	text-align: center;
	font-style: italic;
}

/* Compact table */
.wp-block-table.is-style-compact td,
.wp-block-table.is-style-compact th {
	padding: 0.5rem;
	font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
	.wp-block-table {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.wp-block-table table {
		min-width: 600px;
	}
}

/* Scrollbar */
.wp-block-table::-webkit-scrollbar {
	height: 8px;
}

.wp-block-table::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.05);
	border-radius: 4px;
}

.wp-block-table::-webkit-scrollbar-thumb {
	background: rgba(0, 122, 204, 0.3);
	border-radius: 4px;
}

html.dark-theme .wp-block-table::-webkit-scrollbar-thumb {
	background: rgba(253, 185, 19, 0.3);
}

.wp-block-table::-webkit-scrollbar-thumb:hover {
	background: #007ACC;
}

html.dark-theme .wp-block-table::-webkit-scrollbar-thumb:hover {
	background: #FDB913;
}
