/* CIPC Press Releases - Frontend (ensure these load with the shortcode) */

.cipc-press-releases-wrapper.cipc-pr-styled,
.cipc-press-releases-wrapper {
	box-sizing: border-box;
	display: block;
	max-width: 100%;
	margin: 1.5em 0;
	visibility: visible;
}

.cipc-press-releases-wrapper *,
.cipc-press-releases-wrapper *::before,
.cipc-press-releases-wrapper *::after {
	box-sizing: border-box;
}

.cipc-pr-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.5rem;
	margin-bottom: 1.5rem;
	align-items: flex-end;
}

.cipc-pr-filter-group {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cipc-pr-filter-group label {
	font-weight: 600;
	margin-bottom: 0.35em;
	font-size: 0.95em;
}

.cipc-pr-filter {
	padding: 0.5em 0.75em;
	min-width: 180px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	font-size: 1em;
}

.cipc-pr-table-wrap {
	display: block;
	overflow-x: auto;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fff;
}

.cipc-pr-table {
	display: table;
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
	visibility: visible;
}

.cipc-pr-table th,
.cipc-pr-table td {
	padding: 0.75rem 1rem;
	text-align: left;
	border-bottom: 1px solid #eee;
}

.cipc-pr-table thead th {
	background: #9cca92;
	color: #fff;
	font-weight: 600;
	border-bottom: 2px solid #8ab87f;
}

.cipc-pr-table tbody tr:nth-child(even) {
	background: rgba(156, 202, 146, 0.2);
}

.cipc-pr-table tbody tr:hover {
	background: rgba(156, 202, 146, 0.4);
}

.cipc-pr-table tbody td a {
	color: inherit;
	text-decoration: none;
	font-weight: 500;
}

.cipc-pr-table tbody td a:hover {
	text-decoration: underline;
}

.cipc-pr-loading {
	display: none;
	margin-top: 1rem;
	padding: 0.75rem;
	text-align: center;
	background: rgba(156, 202, 146, 0.25);
	border-radius: 4px;
}

.cipc-press-releases-wrapper.is-loading .cipc-pr-loading {
	display: block;
}

.cipc-press-releases-wrapper.is-loading .cipc-pr-table-wrap {
	opacity: 0.6;
	pointer-events: none;
}

/* Responsive: stack table as cards on small screens */
@media (max-width: 640px) {
	.cipc-pr-filters {
		flex-direction: column;
		align-items: stretch;
	}

	.cipc-pr-filter {
		min-width: 0;
		width: 100%;
	}

	.cipc-pr-table thead {
		display: none;
	}

	.cipc-pr-table tbody tr {
		display: block;
		border-bottom: 1px solid #ddd;
		padding: 0.75rem 0;
	}

	.cipc-pr-table tbody tr:hover {
		background: transparent;
	}

	.cipc-pr-table tbody td {
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
		padding: 0.35rem 0;
		border-bottom: none;
	}

	.cipc-pr-table tbody td::before {
		content: attr(data-label);
		font-weight: 600;
		margin-right: 0.5rem;
		flex-shrink: 0;
	}

	.cipc-pr-table tbody td:first-child {
		padding-top: 0.5rem;
	}

	.cipc-pr-table tbody tr td:last-child {
		padding-bottom: 0.5rem;
	}
}
