/* Crop Loan Calendar – front-end styles. Inherits theme colours where possible. */
.clc-wrap {
	--clc-accent: #2e7d32;
	--clc-border: rgba(0, 0, 0, .12);
	--clc-muted: rgba(0, 0, 0, .6);
	--clc-cat-bg: rgba(46, 125, 50, .08);
	margin: 1.5em 0;
}
.clc-title { margin-bottom: .75em; }

.clc-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 16px;
	align-items: flex-end;
	margin-bottom: 1em;
}
.clc-filters label { display: flex; flex-direction: column; gap: 4px; font-size: .9em; }
.clc-filters label span { font-weight: 600; }
.clc-filters input,
.clc-filters select {
	min-width: 180px;
	padding: 8px 10px;
	border: 1px solid var(--clc-border);
	border-radius: 6px;
	font: inherit;
	background: #fff;
}
.clc-count { margin-left: auto; color: var(--clc-muted); font-size: .9em; padding-bottom: 8px; }

.clc-table-scroll { overflow-x: auto; }
.clc-table { width: 100%; border-collapse: collapse; font-size: .95em; }
.clc-table th,
.clc-table td { border: 1px solid var(--clc-border); padding: 8px 10px; vertical-align: top; text-align: left; }
.clc-table thead th { background: var(--clc-accent); color: #fff; font-weight: 600; }
.clc-table .clc-cat-row th { background: var(--clc-cat-bg); color: var(--clc-accent); font-weight: 700; }
.clc-table td:first-child { white-space: nowrap; width: 3.5em; }

.clc-name { font-weight: 600; }
.clc-variant {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 8px;
	border-radius: 10px;
	background: var(--clc-cat-bg);
	color: var(--clc-accent);
	font-size: .8em;
	font-weight: 500;
}
.clc-bn, .clc-en, .clc-desc, .clc-note { display: block; }
.clc-en { color: var(--clc-muted); font-size: .92em; }
.clc-note { color: var(--clc-muted); font-size: .85em; font-style: italic; }
.clc-note-pre { font-style: normal; font-weight: 600; color: inherit; }
.clc-empty { color: var(--clc-muted); }
.clc-no-results { padding: 1em; text-align: center; color: var(--clc-muted); }
.clc-footnote { margin-top: 1em; font-size: .85em; color: var(--clc-muted); }

/* Mobile: turn rows into cards */
@media (max-width: 720px) {
	.clc-table thead { display: none; }
	.clc-table, .clc-table tbody, .clc-table tr, .clc-table td, .clc-table th { display: block; width: 100%; }
	.clc-table tr.clc-row { border: 1px solid var(--clc-border); border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
	.clc-table td { border: 0; border-top: 1px solid var(--clc-border); }
	.clc-table td:first-child { border-top: 0; width: auto; }
	.clc-table td::before {
		content: attr(data-label);
		display: block;
		font-size: .8em;
		font-weight: 600;
		color: var(--clc-accent);
		margin-bottom: 2px;
	}
	.clc-table .clc-cat-row th { border: 0; border-radius: 6px; margin: 14px 0 8px; }
	.clc-count { margin-left: 0; }
	.clc-filters label, .clc-filters input, .clc-filters select { width: 100%; }
}

/* Single crop card */
.clc-card { border: 1px solid rgba(0, 0, 0, .12); border-radius: 8px; padding: 14px 16px; margin: 1em 0; }
.clc-card-title { margin: 0 0 8px; }
.clc-card dl { margin: 0; }
.clc-card dt { font-weight: 600; color: #2e7d32; margin-top: 8px; font-size: .9em; }
.clc-card dd { margin: 2px 0 0; }
.clc-card .clc-en { color: rgba(0, 0, 0, .6); font-size: .92em; }
.clc-card .clc-bn, .clc-card .clc-en, .clc-card .clc-desc, .clc-card .clc-note { display: block; }
.clc-card .clc-variant { margin-left: 6px; font-size: .75em; padding: 1px 8px; border-radius: 10px; background: rgba(46, 125, 50, .08); color: #2e7d32; }

/* Filtering must win over the mobile display rules above */
.clc-wrap [hidden] { display: none !important; }
.clc-wrap *, .clc-wrap *::before, .clc-wrap *::after { box-sizing: border-box; }
/* When a period has only a Gregorian date, show it at full strength */
.clc-table .clc-en:first-child, .clc-card .clc-en:first-child { color: inherit; font-size: inherit; }
