/* Kindness Charter Flow — front-end styles.
   Brand tokens are defined once here so the whole theme is adjustable in one place. */

.kcf-app {
	/* Apollo Hospitals brand colours — matched to the real logo
	   (teal #007C9E + flame gold #FDB813), same tokens as core.css. */
	--kcf-teal: #007C9E;
	--kcf-teal-light: #4FAFC9;
	--kcf-deep: #005066;
	--kcf-deep-2: #002A36;
	--kcf-gradient: linear-gradient(90deg, #007C9E 0%, #002A36 100%);
	--kcf-gold: #FDB813;
	--kcf-gold-soft: #FDE8B8;
	--kcf-ink: #002A36;
	--kcf-muted: #5a7a88;
	--kcf-line: #c3e0eb;
	--kcf-bg: #f0f7fa;
	--kcf-card: #FFFFFF;
	--kcf-radius: 18px;
	--kcf-radius-sm: 12px;
	--kcf-shadow: 0 10px 30px rgba(12, 92, 125, 0.10);
	--kcf-font: "Newsreader", Georgia, serif;
	--kcf-sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	font-family: var(--kcf-sans);
	color: var(--kcf-ink);
	display: flex;
	justify-content: center;
	background: var(--kcf-bg);
	min-height: 85vh;
	padding: 0;
	box-sizing: border-box;
}

.kcf-app *,
.kcf-app *::before,
.kcf-app *::after {
	box-sizing: border-box;
}

/* Centred column that reads well on both phone and desktop. */
.kcf-stage {
	width: 100%;
	max-width: 460px;
	min-height: 85vh;
	background: var(--kcf-card);
	display: flex;
	flex-direction: column;
	position: relative;
	overflow: hidden;
}

@media (min-width: 700px) {
	.kcf-app { padding: 32px 16px; }
	.kcf-stage {
		min-height: auto;
		border-radius: 28px;
		box-shadow: var(--kcf-shadow);
		max-height: calc(100vh - 64px);
	}
}

.kcf-screen {
	display: none;
	flex-direction: column;
	flex: 1;
	padding: 22px 24px 28px;
	overflow-y: auto;
	animation: kcf-fade 0.35s ease;
}
.kcf-screen.is-active { display: flex; }

@keyframes kcf-fade {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.kcf-topbar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	min-height: 40px;
}
.kcf-back {
	border: none;
	background: none;
	font-size: 22px;
	color: var(--kcf-deep);
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 8px;
	line-height: 1;
}
.kcf-back:focus-visible { outline: 3px solid var(--kcf-gold-soft); }
.kcf-brand { display: flex; align-items: center; gap: 8px; margin-left: auto; margin-right: auto; }
.kcf-brand img { height: 40px; width: auto; }
.kcf-brand-name { font-size: 12px; line-height: 1.15; color: var(--kcf-deep); font-weight: 700; }
.kcf-brand-name span { display: block; font-weight: 400; color: var(--kcf-muted); text-transform: capitalize;}

/* Logo blocks */
.kcf-logo-hero { text-align: center; margin: 6px auto 8px; }
.kcf-logo-hero img { width: 168px; height: auto; }
.kcf-logo-hero.kcf-ripple img { animation: kcf-rise 1.2s ease both; }
@keyframes kcf-rise {
	0% { transform: translateY(10px) scale(0.96); opacity: 0; }
	100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Typography */
.kcf-h1 { font-family: var(--kcf-font); font-size: 30px; line-height: 1.15; color: var(--kcf-deep); margin: 6px 0 10px; text-align: center; font-weight: 700; }
.kcf-h1 .kcf-accent { color: var(--kcf-teal); }
.kcf-h2 { font-family: var(--kcf-font); font-size: 23px; color: var(--kcf-deep); margin: 4px 0 8px; text-align: center; font-weight: 700; }
.kcf-h2 .kcf-accent { color: var(--kcf-teal); }
.kcf-h2-lg { font-size: 26px; line-height: 1.25; }
.kcf-lead { font-size: 16px; line-height: 1.5; color: var(--kcf-ink); text-align: center; margin: 0 0 14px; }
.kcf-sub { font-size: 15px; line-height: 1.5; color: var(--kcf-muted); text-align: center; margin: 0 0 16px; }
.kcf-quote { font-style: italic; color: var(--kcf-teal); background: #F0F8FB; border-radius: var(--kcf-radius-sm); padding: 12px 16px; text-align: center; font-size: 14px; margin: 12px 0; }
.kcf-footnote { font-size: 13px; color: var(--kcf-muted); text-align: center; margin-top: 10px; }
.kcf-footnote .kcf-link { font-size: 13px; }
.kcf-footnote .kcf-link:disabled { color: var(--kcf-muted); cursor: default; }
.kcf-footnote.is-sent { color: var(--kcf-teal); }

/* Hero heading with decorative sparks */
.kcf-hero-heading { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 4px 0; }
.kcf-hero-heading .kcf-h2 { margin: 0; }
.kcf-spark { font-size: 18px; color: var(--kcf-gold); flex-shrink: 0; }

/* "Little moments" icon grid */
.kcf-icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 18px; }
.kcf-icon-item { text-align: center; }
.kcf-icon-circle {
	width: 52px;
	height: 52px;
	margin: 0 auto 8px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
}
.kcf-icon-item p { margin: 0; font-size: 11.5px; line-height: 1.3; color: var(--kcf-ink); }

/* Highlight callout */
.kcf-highlight-box {
	background: #EAF6FA;
	border-radius: var(--kcf-radius-sm);
	padding: 16px;
	text-align: center;
	font-weight: 700;
	font-size: 16px;
	color: var(--kcf-deep);
	margin: 4px 0 16px;
}

/* Decorative wave footer */
.kcf-wave-footer {
	margin-top: 22px;
	padding: 20px 10px 4px;
	border-top: 1px solid var(--kcf-line);
	text-align: center;
}
.kcf-wave-tagline {
	display: block;
	font-family: var(--kcf-font);
	font-style: italic;
	color: var(--kcf-teal);
	font-size: 15px;
	margin-bottom: 6px;
}
.kcf-wave-caption {
	display: block;
	font-size: 10px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--kcf-muted);
}

/* Buttons */
.kcf-btn {
	appearance: none;
	border: none;
	background: var(--kcf-gradient);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	padding: 15px 20px;
	border-radius: var(--kcf-radius-sm);
	cursor: pointer;
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: opacity 0.2s ease, transform 0.1s ease;
	font-family: var(--kcf-sans);
}
.kcf-btn:hover { opacity: 0.92; }
.kcf-btn:active { transform: translateY(1px); }
.kcf-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.kcf-btn:focus-visible { outline: 3px solid var(--kcf-gold-soft); outline-offset: 2px; }
.kcf-btn-ghost { background: transparent; color: var(--kcf-deep); border: 1.5px solid var(--kcf-line); }
.kcf-btn-ghost:hover { background: #F0F8FB; }
.kcf-spacer { flex: 1; }
.kcf-actions { margin-top: auto; padding-top: 16px; }

/* Forms */
.kcf-field { margin-bottom: 14px; }
.kcf-label { display: block; font-size: 13px; font-weight: 600; color: var(--kcf-deep); margin-bottom: 6px; }
.kcf-input, .kcf-select {
	width: 100%;
	padding: 13px 14px;
	border: 1.5px solid var(--kcf-line);
	border-radius: var(--kcf-radius-sm);
	font-size: 15px;
	color: var(--kcf-ink);
	background: #fff;
	font-family: var(--kcf-sans);
}
.kcf-input:focus, .kcf-select:focus { outline: none; border-color: var(--kcf-teal); box-shadow: 0 0 0 3px rgba(0,124,156,0.12); }
.kcf-error { color: #B4232A; font-size: 13px; margin: 6px 0 0; min-height: 16px; }

.kcf-phone-row { display: flex; gap: 8px; }
.kcf-phone-code { flex: 0 0 92px; padding-left: 10px; padding-right: 4px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.kcf-phone-number { flex: 1; min-width: 0; }

@media (max-width: 360px) {
	.kcf-phone-code { flex-basis: 80px; }
}

/* Field with a leading icon badge (location step) */
.kcf-field-icon { display: flex; align-items: flex-start; gap: 12px; }
.kcf-field-icon-badge {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	margin-top: 2px;
}
.kcf-field-icon-body { flex: 1; min-width: 0; }

.kcf-checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--kcf-ink); margin: 12px 0; }
.kcf-checkbox input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--kcf-teal); }

/* Role tiles */
.kcf-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.kcf-role {
	border: 1.5px solid var(--kcf-line);
	border-radius: var(--kcf-radius-sm);
	background: #fff;
	padding: 16px 12px;
	text-align: center;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: var(--kcf-deep);
	transition: border-color 0.15s ease, background 0.15s ease;
}
.kcf-role:hover { border-color: var(--kcf-teal); }
.kcf-role.is-selected { border-color: var(--kcf-teal); background: #EAF6FA; }
.kcf-role .kcf-role-icon { font-size: 22px; display: block; margin-bottom: 6px; }

/* Points list */
.kcf-points { list-style: none; padding: 0; margin: 12px 0; }
.kcf-points li { position: relative; padding-left: 22px; margin-bottom: 10px; font-size: 15px; line-height: 1.45; }
.kcf-points li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--kcf-teal); }

/* Global total banner */
.kcf-global-total {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--kcf-gradient);
	color: #fff;
	border-radius: var(--kcf-radius-sm);
	padding: 12px 18px;
	font-size: 13px;
	font-weight: 500;
	margin: 4px 0 18px;
	text-align: center;
	box-shadow: 0 6px 16px rgba(12, 92, 125, 0.18);
}
.kcf-global-total strong { font-size: 19px; font-weight: 700; margin: 0 2px; }

/* Principle grid */
.kcf-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 8px 0 14px; }
.kcf-tile {
	position: relative;
	border: none;
	border-radius: var(--kcf-radius-sm);
	padding: 26px 8px 12px;
	text-align: center;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	color: var(--kcf-deep);
	min-height: 108px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	box-shadow: 0 2px 6px rgba(12, 92, 125, 0.08);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.kcf-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(12, 92, 125, 0.16); }
.kcf-tile.is-logging { opacity: 0.55; transform: scale(0.96); pointer-events: none; }
.kcf-tile:focus-visible { outline: 3px solid var(--kcf-gold-soft); }
.kcf-tile .kcf-tile-num {
	position: absolute;
	top: 8px;
	left: 8px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.65);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	font-weight: 700;
	color: var(--kcf-deep);
}
.kcf-tile .kcf-tile-likes {
	position: absolute;
	top: 6px;
	right: 6px;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 10px;
	font-weight: 700;
	color: var(--kcf-deep);
	background: rgba(255, 255, 255, 0.75);
	border-radius: 999px;
	padding: 2px 6px;
}
.kcf-tile .kcf-tile-icon { font-size: 22px; line-height: 1; margin-bottom: 2px; color: var(--kcf-deep); }
.kcf-tile .kcf-tile-icon svg { width: 24px; height: 24px; display: block; margin: 0 auto; }
.kcf-tile .kcf-tile-label { line-height: 1.25; }

/* Principle detail icon */
.kcf-principle-icon {
	width: 72px;
	height: 72px;
	margin: 6px auto 8px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	color: var(--kcf-deep);
}
.kcf-principle-icon svg { width: 32px; height: 32px; }

/* Pager dots */
.kcf-dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0; }
.kcf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--kcf-line); }
.kcf-dot.is-on { background: var(--kcf-teal); }

/* Confirmation */
.kcf-center { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; }
.kcf-badge { width: 130px; height: auto; margin: 6px 0 14px; }

/* Summary card */
.kcf-summary-card { border: 1.5px solid var(--kcf-line); border-radius: var(--kcf-radius); padding: 22px; text-align: center; margin: 12px 0; }
.kcf-count { font-size: 46px; font-weight: 700; color: var(--kcf-deep); line-height: 1; }
.kcf-link { color: var(--kcf-teal); font-weight: 600; text-decoration: none; cursor: pointer; background: none; border: none; font-size: 15px; }
.kcf-link:hover { text-decoration: underline; }

/* History */
.kcf-history { list-style: none; padding: 0; margin: 10px 0; }
.kcf-history li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--kcf-line); font-size: 14px; }
.kcf-history .kcf-history-when { color: var(--kcf-muted); font-size: 12px; }

/* Confetti */
.kcf-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.kcf-confetti span { position: absolute; top: -12px; width: 8px; height: 12px; opacity: 0.9; animation: kcf-fall linear forwards; }
@keyframes kcf-fall {
	to { transform: translateY(120vh) rotate(360deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.kcf-screen,
	.kcf-logo-hero.kcf-ripple img,
	.kcf-confetti span { animation: none !important; }
}
