/*
 * Regulatory Deadline Tracker (Reg Watch 1.5.0). Every rule is scoped under .rw-dl, so nothing can
 * reach the theme or any other plugin. Colors are the MyAgLife theme's own variables, with fallbacks.
 */

.rw-dl {
	--dl-forest: var(--forest, #073e2b);
	--dl-green: var(--green, #147c43);
	--dl-bright: var(--bright, #15994d);
	--dl-lime: var(--lime, #d5e584);
	--dl-ink: var(--ink, #162a2a);
	--dl-muted: var(--muted, #5e6d69);
	--dl-cream: var(--cream, #f5f7f2);
	--dl-line: var(--line, #e1e8e0);
	--dl-red: #b3261e;
	--dl-amber: #9a5b00;
	--dl-amber-bg: #fdf1dc;
	color: var(--dl-ink);
}

.rw-dl * { box-sizing: border-box; }
.rw-dl [hidden] { display: none !important; }

/* ---- The four tiles across the top ---- */
.rw-dl-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin-bottom: 38px;
}
.rw-dl-stat {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 20px 20px 18px;
	border-radius: 14px;
	background: var(--dl-cream);
	border: 1px solid var(--dl-line);
	border-top: 4px solid var(--dl-bright);
	min-height: 132px;
}
.rw-dl-stat-lead {
	background: var(--dl-forest);
	border-color: var(--dl-forest);
	border-top-color: var(--dl-lime);
	color: #fff;
}
.rw-dl-stat-k {
	font-size: .68rem;
	letter-spacing: .15em;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--dl-green);
}
.rw-dl-stat-lead .rw-dl-stat-k { color: var(--dl-lime); }
.rw-dl-stat-v {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 2.6rem;
	line-height: 1.05;
	font-weight: 700;
	letter-spacing: -.03em;
}
.rw-dl-stat-s { font-size: .86rem; color: var(--dl-muted); }
.rw-dl-stat-lead .rw-dl-stat-s { color: #dfe9e2; }

/* ---- Sections ---- */
.rw-dl-section { margin-bottom: 44px; }
.rw-dl .section-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	border-bottom: 2px solid var(--dl-forest);
	padding-bottom: 12px;
	margin-bottom: 22px;
}

/* ---- Filters ---- */
.rw-dl-filters {
	display: grid;
	gap: 12px;
	padding: 18px 20px;
	border-radius: 14px;
	background: var(--dl-cream);
	border: 1px solid var(--dl-line);
	margin-bottom: 26px;
}
.rw-dl-fgroup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rw-dl-flabel {
	width: 66px;
	font-size: .68rem;
	letter-spacing: .15em;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--dl-green);
}
.rw-dl-chip {
	border: 1px solid #c9d6cb;
	background: #fff;
	color: var(--dl-ink);
	border-radius: 99px;
	padding: 7px 15px;
	font-size: .84rem;
	font-weight: 700;
	line-height: 1.2;
}
.rw-dl-chip span { color: var(--dl-muted); font-weight: 600; margin-left: 3px; }
.rw-dl-chip:hover { border-color: var(--dl-bright); }
.rw-dl-chip.is-on { background: var(--dl-forest); border-color: var(--dl-forest); color: #fff; }
.rw-dl-chip.is-on span { color: var(--dl-lime); }

/* ---- Month groups and entries ---- */
.rw-dl-month + .rw-dl-month { margin-top: 30px; }
.rw-dl-month-h {
	font-size: .78rem;
	letter-spacing: .15em;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--dl-muted);
	margin-bottom: 14px;
}
.rw-dl-item {
	display: grid;
	grid-template-columns: 92px minmax(0, 1fr);
	gap: 22px;
	padding: 22px;
	border: 1px solid var(--dl-line);
	border-left: 5px solid var(--dl-bright);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 12px 34px #1938240b;
}
.rw-dl-item + .rw-dl-item { margin-top: 14px; }
.rw-dl-type-hearing { border-left-color: #2f6fae; }
.rw-dl-type-compliance, .rw-dl-type-filing { border-left-color: var(--dl-amber); }

.rw-dl-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	align-self: start;
	padding: 12px 6px;
	border-radius: 12px;
	background: var(--dl-forest);
	color: #fff;
	text-align: center;
}
.rw-dl-mon { font-size: .76rem; letter-spacing: .16em; font-weight: 800; text-transform: uppercase; color: var(--dl-lime); }
.rw-dl-day { font-family: Georgia, "Times New Roman", serif; font-size: 2.5rem; line-height: 1; font-weight: 700; margin: 4px 0; }
.rw-dl-dow { font-size: .76rem; font-weight: 700; color: #dfe9e2; }

.rw-dl-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.rw-dl-type, .rw-dl-left {
	display: inline-block;
	border-radius: 99px;
	padding: 4px 11px;
	font-size: .7rem;
	letter-spacing: .08em;
	font-weight: 800;
	text-transform: uppercase;
	line-height: 1.4;
}
.rw-dl-type { background: #e7f3ea; color: var(--dl-green); }
.rw-dl-type-hearing .rw-dl-type { background: #e6eff8; color: #2f6fae; }
.rw-dl-type-compliance .rw-dl-type, .rw-dl-type-filing .rw-dl-type { background: var(--dl-amber-bg); color: var(--dl-amber); }
.rw-dl-now { background: var(--dl-red); color: #fff; }
.rw-dl-soon { background: #fbe3e1; color: var(--dl-red); }
.rw-dl-later { background: var(--dl-cream); color: var(--dl-ink); border: 1px solid var(--dl-line); }
.rw-dl-passed { background: #eceeed; color: var(--dl-muted); }

.rw-dl-agency { display: inline-block; border-radius: 99px; padding: 4px 11px; font-size: .7rem; letter-spacing: .08em; font-weight: 800; text-transform: uppercase; line-height: 1.4; background: var(--dl-forest); color: #fff; }
.rw-dl-h { font-size: 1.22rem; line-height: 1.4; margin: 0 0 8px; color: var(--dl-forest); }
.rw-dl-id { font-size: .84rem; color: var(--dl-muted); margin: 0 0 16px; }
.rw-dl-docket { font-weight: 600; }
.rw-dl-h + .rw-dl-actions { margin-top: 14px; }

.rw-dl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rw-dl-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 40px;
	padding: 9px 18px;
	border-radius: 99px;
	border: 1px solid var(--dl-bright);
	color: var(--dl-green);
	background: #fff;
	font-size: .84rem;
	font-weight: 700;
	line-height: 1.2;
}
.rw-dl-btn:hover { background: #e7f3ea; color: var(--dl-forest); }
.rw-dl-btn-main { background: var(--dl-bright); color: #fff; box-shadow: 0 5px 12px #137b4320; }
.rw-dl-btn-main:hover { background: var(--dl-green); color: #fff; }
.rw-dl-btn-quiet { border-color: #c9d6cb; color: var(--dl-ink); }
.rw-dl-issue {
	margin-left: auto;
	font-size: .84rem;
	font-weight: 700;
	color: var(--dl-green);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Passed: same layout, quieter */
.rw-dl-past .rw-dl-item { border-left-color: #b9c2bd; box-shadow: none; background: #fbfcfb; }
.rw-dl-past .rw-dl-date { background: #6c7a74; }
.rw-dl-past .rw-dl-h { color: var(--dl-ink); }

.rw-dl-empty, .rw-dl-none {
	padding: 22px;
	border-radius: 14px;
	background: var(--dl-cream);
	color: var(--dl-ink);
	font-weight: 600;
}

/* ---- Where these dates come from ---- */
.rw-dl-about {
	padding: 30px 32px;
	border-radius: 14px;
	background: var(--dl-forest);
	color: #fff;
}
.rw-dl-about h2 { color: #fff; font-size: clamp(1.6rem, 2.4vw, 2.2rem); margin-bottom: 12px; }
.rw-dl-about p { color: #dfe9e2; margin-bottom: 20px; max-width: 62ch; }
.rw-dl-about .rw-dl-btn { border-color: #fff; color: var(--dl-forest); }
.rw-dl-about .rw-dl-btn-main { background: var(--dl-lime); border-color: var(--dl-lime); color: var(--dl-forest); }

@media (max-width: 900px) {
	.rw-dl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	/* Phones: the date becomes a bar across the top, so the text gets the full width */
	.rw-dl-item { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; }
	.rw-dl-date { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 8px 14px; align-self: stretch; }
	.rw-dl-day { font-size: 1.6rem; margin: 0; }
	.rw-dl-mon, .rw-dl-dow { font-size: .8rem; }
	.rw-dl-actions .rw-dl-btn { flex: 1 1 auto; justify-content: center; }
	.rw-dl-issue { margin-left: 0; width: 100%; }
	.rw-dl-flabel { width: 100%; }
}
