/* St. Mary Campaign Tracker. Themes can override the custom properties below. */
.smct {
	--smct-accent: #8a1c2b;
	--smct-accent-2: #b8323f;
	--smct-gold: #c9a227;
	--smct-ink: #2a1a14;
	--smct-muted: #6b5a50;
	--smct-surface: #ffffff;
	--smct-track: #efe6d8;
	--smct-radius: 14px;
	color: var(--smct-ink);
	font-variant-numeric: tabular-nums;
}
.smct *, .smct *::before, .smct *::after { box-sizing: border-box; }
.smct p { margin: 0; }
[hidden].smct, .smct [hidden] { display: none !important; }

/* ---------- Thermometer ---------- */
.smct-thermo {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
}
.smct-thermo__gauge {
	position: relative;
	width: 92px;
	height: 360px;
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-right: 64px; /* room for tick labels */
}
.smct-thermo__tube {
	position: relative;
	flex: 1;
	width: 44px;
	margin-bottom: -18px;
	background: var(--smct-track);
	border-radius: 22px 22px 0 0;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, .12);
	overflow: visible;
}
.smct-thermo__fill {
	position: absolute;
	left: 7px; right: 7px; bottom: 0;
	height: calc(var(--smct-pct, 0%) * .97);
	min-height: 18px;
	border-radius: 16px 16px 0 0;
	background: linear-gradient(90deg, var(--smct-accent), var(--smct-accent-2) 55%, var(--smct-accent));
	transition: height 1.6s cubic-bezier(.2, .8, .2, 1);
}
.smct-thermo__fill::after {
	content: "";
	position: absolute; left: 6px; top: 8px; bottom: 8px; width: 6px;
	border-radius: 3px;
	background: rgba(255, 255, 255, .35);
}
.smct-thermo__tick {
	position: absolute;
	left: 100%;
	width: 14px;
	border-top: 2px solid var(--smct-muted);
	opacity: .6;
	transform: translateY(1px);
}
.smct-thermo__tick em {
	position: absolute;
	left: 20px; top: -.7em;
	font-style: normal;
	font-size: .8rem;
	white-space: nowrap;
	color: var(--smct-muted);
}
.smct-thermo__bulb {
	position: relative;
	width: 92px; height: 92px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, var(--smct-accent-2), var(--smct-accent) 70%);
	box-shadow: 0 0 0 7px var(--smct-track), 0 10px 24px rgba(138, 28, 43, .35);
	display: grid; place-items: center;
	color: #fff;
	font-weight: 700;
	font-size: 1.35rem;
}
.smct-thermo__title { font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; color: var(--smct-accent); margin-bottom: .25rem; }
.smct-thermo__total {
	font-size: clamp(2.8rem, 8vw, 4.75rem);
	line-height: 1;
	font-weight: 700;
	color: var(--smct-accent);
	letter-spacing: -.02em;
}
.smct-thermo__of { font-size: 1.2rem; margin-top: .4rem !important; color: var(--smct-muted); }
.smct-thermo__of strong { color: var(--smct-ink); }
.smct-thermo__grid {
	display: flex; flex-wrap: wrap; gap: .75rem;
	margin: 1.5rem 0 1rem;
}
.smct-thermo__grid > div {
	background: var(--smct-surface);
	border: 1px solid var(--smct-track);
	border-radius: var(--smct-radius);
	padding: .75rem 1rem;
	min-width: 9rem;
}
.smct-thermo__grid dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--smct-muted); }
.smct-thermo__grid dd { margin: .15rem 0 0; font-size: 1.45rem; font-weight: 700; }
.smct-thermo__goalmet {
	background: linear-gradient(90deg, var(--smct-gold), #e6c65a);
	color: var(--smct-ink);
	font-weight: 700;
	padding: .8rem 1rem;
	border-radius: var(--smct-radius);
	margin-bottom: 1rem !important;
}
.smct-thermo__updated { font-size: .85rem; color: var(--smct-muted); display: flex; align-items: center; gap: .45rem; }
.smct-dot { width: 9px; height: 9px; border-radius: 50%; background: #2e9e5b; box-shadow: 0 0 0 0 rgba(46, 158, 91, .6); animation: smct-pulse 2s infinite; }
.is-goal-met .smct-thermo__fill { background: linear-gradient(90deg, #a8841a, var(--smct-gold) 55%, #a8841a); }
.is-goal-met .smct-thermo__bulb { background: radial-gradient(circle at 35% 35%, #e6c65a, #a8841a 70%); }
.is-bumped .smct-thermo__total, .is-bumped.smct-progress strong { animation: smct-bump .9s ease; }

@media (max-width: 560px) {
	.smct-thermo { grid-template-columns: 1fr; justify-items: center; text-align: center; }
	.smct-thermo__gauge { height: 280px; margin-right: 64px; margin-left: 0; }
	.smct-thermo__grid { justify-content: center; }
	.smct-thermo__updated { justify-content: center; }
}

/* ---------- Bars ---------- */
.smct-bar {
	height: 10px;
	border-radius: 999px;
	background: var(--smct-track);
	overflow: hidden;
}
.smct-bar > span {
	display: block; height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--smct-accent), var(--smct-accent-2));
	transition: width 1.6s cubic-bezier(.2, .8, .2, 1);
}
.smct-bar--lg { height: 18px; }
.smct-progress__labels { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; font-size: 1rem; }
.smct-progress__labels strong { font-size: 1.35rem; color: var(--smct-accent); display: inline-block; }

/* ---------- Matches ---------- */
.smct-matches {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.25rem;
}
.smct-matches__empty { grid-column: 1 / -1; color: var(--smct-muted); font-style: italic; }
.smct-match {
	position: relative;
	background: var(--smct-surface);
	border: 1px solid var(--smct-track);
	border-radius: var(--smct-radius);
	padding: 1.25rem 1.25rem 1.1rem;
	display: flex; flex-direction: column; gap: .5rem;
}
.smct-match--active {
	border: 2px solid var(--smct-gold);
	box-shadow: 0 10px 30px rgba(201, 162, 39, .25);
}
.smct-match--completed, .smct-match--ended { opacity: .75; }
.smct-match__head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.smct-match__badge {
	font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	padding: .25rem .6rem; border-radius: 999px;
	background: var(--smct-track); color: var(--smct-muted);
}
.smct-match--active .smct-match__badge { background: var(--smct-accent); color: #fff; }
.smct-match--completed .smct-match__badge { background: var(--smct-gold); color: var(--smct-ink); }
.smct-match__ratio { font-weight: 700; color: var(--smct-accent); font-size: .9rem; }
.smct-match__sponsor { margin: .25rem 0 0; font-size: 1.25rem; line-height: 1.25; }
.smct-match__desc { color: var(--smct-muted); font-size: .95rem; }
.smct-match__window { font-size: .85rem; color: var(--smct-muted); }
.smct-match__nums { font-size: .95rem; }
.smct-match__countdown { font-weight: 600; color: var(--smct-accent); font-size: .95rem; }

/* ---------- Live match banner ---------- */
.smct-banner {
	display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
	background: linear-gradient(90deg, #2a1a14, #4a2018);
	color: #fff;
	padding: .9rem 1.25rem;
	border-radius: var(--smct-radius);
	border: 1px solid var(--smct-gold);
}
.smct-banner__pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--smct-gold); animation: smct-pulse-gold 1.6s infinite; flex: none; }
.smct-banner__text { flex: 1; min-width: 14rem; }
.smct-banner__text strong { color: var(--smct-gold); text-transform: uppercase; letter-spacing: .05em; margin-right: .25rem; }
.smct-banner__btn {
	background: var(--smct-gold); color: var(--smct-ink) !important; font-weight: 700;
	padding: .55rem 1.1rem; border-radius: 999px; text-decoration: none !important; white-space: nowrap;
}
.smct-banner__btn:hover { background: #e6c65a; }

/* ---------- Countdown ---------- */
.smct-countdown__label { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .5rem !important; opacity: .85; }
.smct-countdown__units { display: flex; gap: .6rem; }
.smct-countdown__units span {
	display: flex; flex-direction: column; align-items: center;
	min-width: 4.2rem; padding: .6rem .5rem;
	border-radius: 12px;
	background: rgba(255, 255, 255, .1);
	border: 1px solid rgba(255, 255, 255, .25);
}
.smct-countdown__units b { font-size: 1.9rem; line-height: 1; }
.smct-countdown__units small { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; margin-top: .25rem; }

@keyframes smct-pulse { 0% { box-shadow: 0 0 0 0 rgba(46, 158, 91, .6); } 70% { box-shadow: 0 0 0 9px rgba(46, 158, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 158, 91, 0); } }
@keyframes smct-pulse-gold { 0% { box-shadow: 0 0 0 0 rgba(201, 162, 39, .7); } 70% { box-shadow: 0 0 0 10px rgba(201, 162, 39, 0); } 100% { box-shadow: 0 0 0 0 rgba(201, 162, 39, 0); } }
@keyframes smct-bump { 0% { transform: scale(1); } 30% { transform: scale(1.06); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
	.smct *, .smct { animation: none !important; transition: none !important; }
}
