/* ==========================================================================
   CPT Query Lister — Frontend Table Styles
   ========================================================================== */

.cptql-wrapper {
	margin: 1.5em 0;
}

.cptql-title {
	font-size: 1.25em;
	font-weight: 600;
	margin-bottom: 0.75em;
	color: inherit;
}

/* Responsive container */
.cptql-table-responsive {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* Table base */
.cptql-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9em;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	overflow: hidden;
}

/* Header */
.cptql-table thead tr {
	background-color: #1e3a5f;
	color: #fff;
	text-align: left;
}

.cptql-table thead th {
	padding: 12px 16px;
	font-weight: 600;
	font-size: 0.82em;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	white-space: nowrap;
	border: none;
}

/* Body rows */
.cptql-table tbody tr {
	border-bottom: 1px solid #edf2f7;
	transition: background-color 0.12s ease;
}

.cptql-table tbody tr:last-child {
	border-bottom: none;
}

.cptql-table tbody tr:nth-child(even) {
	background-color: #f8fafc;
}

.cptql-table tbody tr:hover {
	background-color: #ebf4ff;
}

/* Cells */
.cptql-table tbody td {
	padding: 10px 16px;
	vertical-align: top;
	color: #374151;
	font-size: 0.9em;
	border: none;
}

/* Title column */
.cptql-col-title a {
	color: #0073aa;
	text-decoration: none;
	font-weight: 500;
}

.cptql-col-title a:hover {
	color: #005a87;
	text-decoration: underline;
}

/* Taxonomy column */
.cptql-col-tax {
	color: #4b5563;
	line-height: 1.6;
}

.cptql-no-terms {
	color: #c0c8d4;
}

/* Notice messages */
.cptql-notice {
	padding: 10px 14px;
	border-left: 4px solid #0073aa;
	background: #e8f4fb;
	color: #004a75;
	margin: 1em 0;
	border-radius: 0 4px 4px 0;
}

.cptql-notice.cptql-error {
	border-color: #d63638;
	background: #fce8e8;
	color: #7a1b1c;
}

/* Responsive: stack on very small screens */
@media screen and (max-width: 480px) {
	.cptql-table,
	.cptql-table thead,
	.cptql-table tbody,
	.cptql-table th,
	.cptql-table td,
	.cptql-table tr {
		display: block;
	}

	.cptql-table thead tr {
		position: absolute;
		top: -9999px;
		left: -9999px;
	}

	.cptql-table tbody tr {
		border: 1px solid #e2e8f0;
		border-radius: 4px;
		margin-bottom: 10px;
	}

	.cptql-table tbody td {
		border-bottom: 1px solid #edf2f7;
		position: relative;
		padding-left: 42%;
	}

	.cptql-table tbody td::before {
		content: attr(data-label);
		position: absolute;
		left: 12px;
		top: 10px;
		width: 38%;
		font-weight: 600;
		font-size: 0.78em;
		text-transform: uppercase;
		color: #888;
		letter-spacing: 0.04em;
	}
}
