/**
 * Zeffy Thermometer — Frontend Stylesheet
 * Bright, round, friendly aesthetic inspired by Galiano Health Care Centre.
 */

.zeffy-thermometer {
	--zt-accent: #21ADC4;
	--zt-accent-light: #56c2d3;
	--zt-progress: 0%;
	--zt-text: #1e2d3b;
	--zt-muted: #645848;
	--zt-track-bg: #f3f1ec;
	--zt-track-border: #e0ddd6;
	--zt-card-border: #ececec;
	--zt-heading-font: 'Be Vietnam Pro', 'Figtree', 'Nunito Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--zt-body-font: 'Nunito Sans', 'Cabin', system-ui, -apple-system, sans-serif;

	box-sizing: border-box;
	width: 100%;
	max-width: 680px;
	margin: 1.5rem auto;
	padding: 24px 28px;
	background: #ffffff;
	border: 2px solid var(--zt-card-border);
	border-radius: 24px;
	box-shadow: 0 8px 24px rgba(21, 124, 142, 0.08);
	color: var(--zt-text);
	font-family: var(--zt-body-font);
	line-height: 1.45;
}

.zeffy-thermometer *,
.zeffy-thermometer *::before,
.zeffy-thermometer *::after {
	box-sizing: border-box;
}

.zeffy-thermometer[hidden],
.zeffy-thermometer [hidden] {
	display: none;
}

/* Header & Title */
.zeffy-thermometer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 16px;
}

.zeffy-thermometer__title {
	margin: 0;
	padding: 0;
	font-family: var(--zt-heading-font);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--zt-text);
}

.zeffy-thermometer__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	padding: 5px 14px;
	border-radius: 9999px;
	background: var(--zt-accent);
	color: #ffffff;
	font-family: var(--zt-heading-font);
	font-size: 0.92rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.2;
	box-shadow: 0 3px 10px rgba(30, 45, 59, 0.1);
}

.zeffy-thermometer--goal-reached .zeffy-thermometer__badge {
	box-shadow: 0 4px 14px rgba(30, 45, 59, 0.16);
}

/* Track & Fill (Shared) */
.zeffy-thermometer__track {
	position: relative;
	background: var(--zt-track-bg);
	border: 1.5px solid var(--zt-track-border);
	border-radius: 9999px;
	overflow: hidden;
}

.zeffy-thermometer__fill {
	position: relative;
	border-radius: 9999px;
	overflow: hidden;
}

.zeffy-thermometer__fill::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.34) 0%,
		rgba(255, 255, 255, 0.06) 55%,
		rgba(0, 0, 0, 0.04) 100%
	);
	pointer-events: none;
}

.zeffy-thermometer__ticks {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.zeffy-thermometer__tick {
	position: absolute;
	background: rgba(100, 88, 72, 0.22);
}

/* Horizontal Orientation */
.zeffy-thermometer--horizontal .zeffy-thermometer__track {
	width: 100%;
	height: 28px;
}

.zeffy-thermometer--horizontal .zeffy-thermometer__fill {
	height: 100%;
	width: var(--zt-progress);
	min-width: 0;
	background: linear-gradient(90deg, var(--zt-accent) 0%, var(--zt-accent-light) 100%);
	transition: width 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.zeffy-thermometer--horizontal .zeffy-thermometer__tick {
	top: 5px;
	bottom: 5px;
	width: 1.5px;
}

.zeffy-thermometer--horizontal .zeffy-thermometer__tick--25 {
	left: 25%;
}

.zeffy-thermometer--horizontal .zeffy-thermometer__tick--50 {
	left: 50%;
}

.zeffy-thermometer--horizontal .zeffy-thermometer__tick--75 {
	left: 75%;
}

/* Stats Row */
.zeffy-thermometer__stats {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 16px;
	margin-top: 14px;
	font-size: 0.98rem;
}

.zeffy-thermometer__raised {
	color: var(--zt-text);
}

.zeffy-thermometer__raised-amount {
	font-family: var(--zt-heading-font);
	font-size: 1.18rem;
	font-weight: 700;
	color: var(--zt-text);
}

.zeffy-thermometer__raised-label {
	color: var(--zt-muted);
	font-weight: 600;
}

.zeffy-thermometer__goal {
	color: var(--zt-muted);
	font-weight: 600;
}

.zeffy-thermometer__goal-amount {
	font-family: var(--zt-heading-font);
	color: var(--zt-text);
	font-weight: 700;
}

/* Vertical Orientation */
.zeffy-thermometer--vertical {
	max-width: 440px;
}

.zeffy-thermometer__vertical-layout {
	display: flex;
	align-items: center;
	gap: 28px;
}

.zeffy-thermometer__tube-wrap {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	flex-shrink: 0;
}

.zeffy-thermometer__scale {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	height: 220px;
	padding: 2px 0;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--zt-muted);
	text-align: right;
	user-select: none;
}

.zeffy-thermometer__stem {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.zeffy-thermometer--vertical .zeffy-thermometer__track {
	width: 42px;
	height: 220px;
	border-radius: 9999px 9999px 0 0;
	border-bottom: none;
}

.zeffy-thermometer--vertical .zeffy-thermometer__fill {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: var(--zt-progress);
	border-radius: 9999px 9999px 0 0;
	background: linear-gradient(0deg, var(--zt-accent) 0%, var(--zt-accent-light) 100%);
	transition: height 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.zeffy-thermometer--vertical .zeffy-thermometer__tick {
	left: 7px;
	right: 7px;
	height: 1.5px;
}

.zeffy-thermometer--vertical .zeffy-thermometer__tick--25 {
	bottom: 25%;
}

.zeffy-thermometer--vertical .zeffy-thermometer__tick--50 {
	bottom: 50%;
}

.zeffy-thermometer--vertical .zeffy-thermometer__tick--75 {
	bottom: 75%;
}

.zeffy-thermometer__bulb {
	position: relative;
	width: 66px;
	height: 66px;
	margin-top: -12px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, var(--zt-accent-light) 0%, var(--zt-accent) 68%);
	border: 2px solid var(--zt-track-border);
	box-shadow: 0 6px 16px rgba(21, 124, 142, 0.16);
}

.zeffy-thermometer__bulb-shine {
	position: absolute;
	top: 11px;
	left: 13px;
	width: 18px;
	height: 12px;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.45);
	transform: rotate(-28deg);
}

.zeffy-thermometer__details {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	flex: 1 1 auto;
	min-width: 0;
}

.zeffy-thermometer--vertical .zeffy-thermometer__stats {
	flex-direction: column;
	align-items: flex-start;
	margin-top: 4px;
	gap: 6px;
}

/* Empty / Fallback State */
.zeffy-thermometer--empty {
	text-align: center;
	padding: 22px 24px;
}

.zeffy-thermometer__empty-message {
	margin: 0;
	color: var(--zt-muted);
	font-size: 0.98rem;
	font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 520px) {
	.zeffy-thermometer {
		padding: 18px 18px;
		border-radius: 20px;
	}

	.zeffy-thermometer__title {
		font-size: 1.1rem;
	}

	.zeffy-thermometer__header {
		flex-wrap: wrap;
		gap: 8px 12px;
	}

	.zeffy-thermometer--vertical .zeffy-thermometer__vertical-layout {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 18px;
	}

	.zeffy-thermometer__details {
		align-items: center;
	}

	.zeffy-thermometer--vertical .zeffy-thermometer__stats {
		align-items: center;
	}
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	.zeffy-thermometer--horizontal .zeffy-thermometer__fill,
	.zeffy-thermometer--vertical .zeffy-thermometer__fill {
		transition: none;
	}
}
