/* =============================================================
   RaiseFunds — Public Frontend Stylesheet
   Primary:  #2D7D46  Deep Irish green
   Accent:   #F4A019  Warm amber / gold
   Light:    #F0F7F1  Pale green background
   Text:     #1C2B20  Near-black with green undertone
   Fonts:    Nunito (headings) / Source Sans 3 (body)
   Mobile-first: base styles = phone, scale up for larger screens
   ============================================================= */

/* -------------------------------------------------------------
   1. Base
   ------------------------------------------------------------- */

.rf-sponsor-page,
.rf-school-landing,
.rf-dashboard-wrap,
.rf-campaigns-wrap,
.rf-register-wrap {
	font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
	font-size: 18px;
	color: #1C2B20;
	line-height: 1.6;
}

.rf-sponsor-page *,
.rf-school-landing *,
.rf-dashboard-wrap *,
.rf-campaigns-wrap *,
.rf-register-wrap * {
	box-sizing: border-box;
}

/* Constrain width on tablets and up */
.rf-sponsor-page,
.rf-school-landing {
	max-width: 680px;
	margin-left: auto;
	margin-right: auto;
}

/* -------------------------------------------------------------
   2. Hero
   ------------------------------------------------------------- */

.rf-sponsor-hero {
	background: #F0F7F1;
	border-bottom: 4px solid #2D7D46;
	padding: 32px 20px 28px;
	text-align: center;
	margin-bottom: 0;
}

.rf-sponsor-hero__name {
	font-family: 'Nunito', sans-serif;
	font-size: 2.2rem;
	font-weight: 800;
	color: #2D7D46;
	margin: 0 0 10px;
	line-height: 1.2;
}

.rf-sponsor-hero__school {
	font-size: 1.1rem;
	font-weight: 600;
	color: #1C2B20;
	margin: 0 0 6px;
}

.rf-sponsor-hero__campaign {
	font-size: 1rem;
	color: #4a6e52;
	margin: 0 0 6px;
}

.rf-sponsor-hero__class {
	display: inline-block;
	background: #2D7D46;
	color: #fff;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: .04em;
	padding: 6px 16px;
	border-radius: 20px;
	margin-top: 10px;
}

/* -------------------------------------------------------------
   3. Section wrappers
   ------------------------------------------------------------- */

.rf-dashboard-section {
	padding: 28px 20px;
	border-bottom: 1px solid #e4ede6;
}

.rf-dashboard-section:last-child {
	border-bottom: none;
}

.rf-dashboard-section h2 {
	font-family: 'Nunito', sans-serif;
	font-size: 1.4rem;
	font-weight: 800;
	color: #2D7D46;
	margin: 0 0 18px;
}

.rf-dashboard-section h3 {
	font-family: 'Nunito', sans-serif;
	font-size: 1.15rem;
	font-weight: 700;
	color: #1C2B20;
	margin: 0 0 14px;
}

/* -------------------------------------------------------------
   4. Stats row — stacked on mobile, row on desktop
   ------------------------------------------------------------- */

.rf-stat-row {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 24px;
}

.rf-stat {
	background: #F0F7F1;
	border: 1px solid #c8e0cc;
	border-radius: 12px;
	padding: 20px 16px;
	text-align: center;
	display: flex;
	align-items: center;
	gap: 16px;
	justify-content: center;
}

.rf-stat__value {
	display: block;
	font-family: 'Nunito', sans-serif;
	font-size: 2rem;
	font-weight: 800;
	color: #2D7D46;
	line-height: 1.1;
}

.rf-stat__label {
	display: block;
	font-size: 0.95rem;
	color: #4a6e52;
	text-transform: uppercase;
	letter-spacing: .05em;
	font-weight: 600;
}

/* -------------------------------------------------------------
   5. Progress bar
   ------------------------------------------------------------- */

.rf-progress {
	background: #c8e0cc;
	border-radius: 99px;
	height: 16px;
	overflow: hidden;
	margin-bottom: 10px;
}

.rf-progress__fill {
	background: linear-gradient(90deg, #2D7D46, #3da55e);
	height: 100%;
	border-radius: 99px;
	transition: width .4s ease;
	min-width: 4px;
}

.rf-progress__label {
	font-size: 1rem;
	color: #4a6e52;
	margin: 0;
}

/* -------------------------------------------------------------
   6. Notices
   ------------------------------------------------------------- */

.rf-notice {
	padding: 16px 20px;
	border-radius: 10px;
	margin-bottom: 24px;
	font-size: 1rem;
	line-height: 1.5;
}

.rf-notice--success {
	background: #eafaf0;
	border: 1px solid #2D7D46;
	color: #1a5c32;
}

.rf-notice--error {
	background: #fff4f4;
	border: 1px solid #d9534f;
	color: #8b1a1a;
}

.rf-notice--info {
	background: #f0f6ff;
	border: 1px solid #4a90d9;
	color: #1a3a5c;
}

/* -------------------------------------------------------------
   7. Forms
   ------------------------------------------------------------- */

.rf-form {
	max-width: 100%;
}

.rf-field {
	margin-bottom: 22px;
}

.rf-field label {
	display: block;
	font-weight: 700;
	font-size: 1rem;
	margin-bottom: 8px;
	color: #1C2B20;
}

.rf-field input[type="text"],
.rf-field input[type="email"],
.rf-field input[type="password"],
.rf-field input[type="tel"],
.rf-field input[type="number"],
.rf-field input[type="date"],
.rf-field input[type="search"],
.rf-field textarea,
.rf-field select {
	width: 100%;
	padding: 14px 16px;
	font-size: 1.1rem;
	font-family: inherit;
	border: 2px solid #c8e0cc;
	border-radius: 10px;
	color: #1C2B20;
	background: #fff;
	transition: border-color .2s;
	-webkit-appearance: none;
	appearance: none;
	/* Prevent iOS zoom on focus (needs 16px+) */
	font-size: max(16px, 1.1rem);
}

.rf-field input:focus,
.rf-field textarea:focus,
.rf-field select:focus {
	outline: none;
	border-color: #2D7D46;
	box-shadow: 0 0 0 3px rgba(45, 125, 70, .15);
}

.rf-field textarea {
	resize: vertical;
	min-height: 90px;
}

.rf-field-row {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.rf-required {
	color: #c0392b;
}

.rf-note {
	font-size: 0.9rem;
	color: #4a6e52;
	font-weight: 400;
}

/* -------------------------------------------------------------
   8. Buttons
   ------------------------------------------------------------- */

.rf-btn {
	display: inline-block;
	padding: 14px 24px;
	font-family: 'Nunito', sans-serif;
	font-size: 1.1rem;
	font-weight: 800;
	border-radius: 10px;
	border: 2px solid transparent;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	transition: background .15s, color .15s, border-color .15s, transform .1s;
	line-height: 1.3;
	/* Minimum accessible touch target */
	min-height: 48px;
}

.rf-btn:hover {
	transform: translateY(-1px);
}

.rf-btn:active {
	transform: translateY(0);
}

.rf-btn--primary {
	background: #2D7D46;
	color: #fff;
	border-color: #2D7D46;
}

.rf-btn--primary:hover {
	background: #236138;
	border-color: #236138;
	color: #fff;
}

.rf-btn--secondary {
	background: #fff;
	color: #2D7D46;
	border-color: #2D7D46;
}

.rf-btn--secondary:hover {
	background: #F0F7F1;
}

.rf-btn--accent {
	background: #F4A019;
	color: #fff;
	border-color: #F4A019;
}

.rf-btn--accent:hover {
	background: #d9880f;
	border-color: #d9880f;
	color: #fff;
}

/* The big donate button — full width, amber, very prominent */
.rf-btn--large {
	padding: 18px 32px;
	font-size: 1.25rem;
	border-radius: 12px;
	width: 100%;
	min-height: 60px;
}

.rf-btn--small {
	padding: 10px 16px;
	font-size: 0.95rem;
	min-height: 44px;
}

.rf-btn--danger {
	background: #fff;
	color: #c0392b;
	border-color: #c0392b;
}

.rf-btn--danger:hover {
	background: #fff4f4;
}

/* -------------------------------------------------------------
   9. Donation amount picker
   ------------------------------------------------------------- */

.rf-amount-options {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-bottom: 4px;
}

.rf-amount-options label {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin: 0;
	font-weight: 400;
}

.rf-amount-options input[type="radio"] {
	display: none;
}

.rf-amount-options label:not(.rf-amount-custom) {
	background: #F0F7F1;
	border: 2px solid #c8e0cc;
	border-radius: 10px;
	padding: 16px 12px;
	font-weight: 800;
	font-size: 1.2rem;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
	color: #2D7D46;
	text-align: center;
	/* Tall touch targets */
	min-height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rf-amount-options input[type="radio"]:checked + span,
.rf-amount-options label:not(.rf-amount-custom):has(input:checked) {
	background: #2D7D46;
	border-color: #2D7D46;
	color: #fff;
}

.rf-amount-custom {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 10px;
	border: 2px solid #c8e0cc;
	border-radius: 10px;
	padding: 10px 16px;
	background: #fff;
	font-weight: 700;
	font-size: 1.1rem;
	color: #2D7D46;
	cursor: pointer;
	min-height: 56px;
}

.rf-amount-custom input[type="number"] {
	flex: 1;
	border: none;
	border-bottom: 2px solid #c8e0cc;
	border-radius: 0;
	padding: 4px 6px;
	font-size: 1.1rem;
	font-family: inherit;
	min-width: 0;
}

.rf-amount-custom input[type="number"]:focus {
	outline: none;
	border-bottom-color: #2D7D46;
	box-shadow: none;
}

.rf-secure-note {
	font-size: 0.9rem;
	color: #4a6e52;
	margin-top: 14px;
	text-align: center;
}

.rf-secure-note::before {
	content: '🔒 ';
}

/* -------------------------------------------------------------
   10. Tables
   ------------------------------------------------------------- */

.rf-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.rf-table th {
	background: #F0F7F1;
	color: #2D7D46;
	font-family: 'Nunito', sans-serif;
	font-weight: 700;
	text-align: left;
	padding: 12px 14px;
	border-bottom: 2px solid #c8e0cc;
}

.rf-table td {
	padding: 12px 14px;
	border-bottom: 1px solid #e4ede6;
	vertical-align: middle;
}

.rf-table tbody tr:last-child td {
	border-bottom: none;
}

.rf-table tbody tr:hover td {
	background: #f8fbf8;
}

/* -------------------------------------------------------------
   11. Status badges
   ------------------------------------------------------------- */

.rf-status {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.rf-status--active {
	background: #eafaf0;
	color: #2D7D46;
	border: 1px solid #2D7D46;
}

.rf-status--draft {
	background: #f5f5f5;
	color: #666;
	border: 1px solid #ccc;
}

.rf-status--closed {
	background: #f5f5f5;
	color: #888;
	border: 1px solid #ccc;
}

.rf-status--pending {
	background: #fff8ec;
	color: #b07400;
	border: 1px solid #F4A019;
}

/* -------------------------------------------------------------
   12. Page headers (campaigns, assign pupils, etc.)
   ------------------------------------------------------------- */

.rf-page-header {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	margin-bottom: 24px;
	gap: 12px;
}

.rf-page-header h2 {
	font-family: 'Nunito', sans-serif;
	font-size: 1.6rem;
	font-weight: 800;
	color: #2D7D46;
	margin: 0;
}

.rf-action-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

.rf-campaign-meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 1rem;
	color: #4a6e52;
	margin-bottom: 20px;
}

/* -------------------------------------------------------------
   13. School dashboard
   ------------------------------------------------------------- */

.rf-dashboard-header {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 24px 20px;
	background: #F0F7F1;
	border-bottom: 4px solid #2D7D46;
}

.rf-dashboard-header h2 {
	font-family: 'Nunito', sans-serif;
	font-size: 1.5rem;
	font-weight: 800;
	color: #2D7D46;
	margin: 0;
}

.rf-stripe-ok {
	color: #2D7D46;
	font-weight: 700;
}

.rf-fee-paid {
	color: #2D7D46;
	font-weight: 700;
}

.rf-info-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 1rem;
}

.rf-info-table th {
	width: 130px;
	text-align: left;
	padding: 10px 12px 10px 0;
	font-weight: 700;
	color: #4a6e52;
	vertical-align: top;
	border-bottom: 1px solid #e4ede6;
}

.rf-info-table td {
	padding: 10px 0;
	color: #1C2B20;
	border-bottom: 1px solid #e4ede6;
}

/* -------------------------------------------------------------
   14. School landing — pupil search
   ------------------------------------------------------------- */

#rf-pupil-search {
	font-family: 'Source Sans 3', sans-serif;
	border-color: #c8e0cc !important;
	font-size: max(16px, 1.1rem) !important;
	padding: 14px 16px !important;
}

#rf-pupil-search:focus {
	border-color: #2D7D46 !important;
	box-shadow: 0 0 0 3px rgba(45,125,70,.15) !important;
}

/* -------------------------------------------------------------
   15. Responsive — scale up for wider screens
   ------------------------------------------------------------- */

@media (min-width: 480px) {
	/* Stats go side-by-side from 480px+ */
	.rf-stat-row {
		flex-direction: row;
	}

	.rf-stat {
		flex: 1;
		flex-direction: column;
		gap: 0;
	}

	/* Two-column field rows on wider screens */
	.rf-field-row {
		flex-direction: row;
		gap: 16px;
	}

	.rf-field-row .rf-field {
		flex: 1;
	}

	/* Amount picker: 4 across on wider phones */
	.rf-amount-options {
		grid-template-columns: repeat(4, 1fr);
	}

	.rf-amount-custom {
		grid-column: auto;
	}

	/* Page header side-by-side */
	.rf-page-header {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	/* Dashboard header side-by-side */
	.rf-dashboard-header {
		flex-direction: row;
		align-items: center;
		flex-wrap: wrap;
	}

	/* Campaign meta in a row */
	.rf-campaign-meta {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 16px;
	}
}

@media (min-width: 640px) {
	.rf-sponsor-page,
	.rf-school-landing {
		font-size: 17px;
	}

	.rf-sponsor-hero__name {
		font-size: 2.6rem;
	}

	.rf-dashboard-section {
		padding: 32px 28px;
	}

	.rf-sponsor-hero {
		padding: 40px 32px 32px;
	}
}
