/*
 * EZVolunteers — Public Styles v2
 * Colors are set via inline CSS custom properties injected by PHP.
 */
:root {
	--ezv-primary:   #2c5f2e;
	--ezv-secondary: #f7f3ee;
	--ezv-btn:       #c0392b;
	--ezv-font:      'Lora', Georgia, serif;
	--ezv-radius:    8px;
	--ezv-shadow:    0 4px 20px rgba(0,0,0,.08);
}

/* ── Container ───────────────────────────────────────────────────────────────── */
.ezv-container {
	font-family: var(--ezv-font);
	color: #2a2a2a;
	max-width: 680px;
	margin: 0 auto;
	padding: 0 12px;
}

/* ── Form card ───────────────────────────────────────────────────────────────── */
.ezv-form {
	background: #fff;
	border: 1px solid #e0dbd4;
	border-radius: var(--ezv-radius);
	box-shadow: var(--ezv-shadow);
	overflow: hidden;
}

.ezv-form-header {
	background: var(--ezv-primary);
	padding: 28px 32px;
	color: #fff;
}

.ezv-form-header h2 {
	font-family: var(--ezv-font);
	font-size: 22px;
	margin: 0 0 6px;
	color: #fff;
}

.ezv-form-header p {
	margin: 0;
	opacity: .85;
	font-size: 14px;
	line-height: 1.5;
}

.ezv-form-body {
	padding: 28px 32px;
}

/* ── Sections ────────────────────────────────────────────────────────────────── */
.ezv-section {
	margin-bottom: 28px;
}

.ezv-section h3 {
	font-family: var(--ezv-font);
	font-size: 14px;
	font-weight: 700;
	color: var(--ezv-primary);
	text-transform: uppercase;
	letter-spacing: .5px;
	margin: 0 0 14px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--ezv-primary);
}

/* ── Fields ──────────────────────────────────────────────────────────────────── */
.ezv-field-row {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.ezv-field {
	flex: 1;
	min-width: 180px;
}

.ezv-field label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .4px;
	color: #555;
	margin-bottom: 5px;
}

.ezv-field input[type="text"],
.ezv-field input[type="email"],
.ezv-field input[type="tel"],
.ezv-field input[type="date"],
.ezv-field select,
.ezv-field textarea {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	font-family: var(--ezv-font);
	transition: border-color .15s, box-shadow .15s;
	background: #fff;
	color: #2a2a2a;
}

.ezv-field input:focus,
.ezv-field select:focus,
.ezv-field textarea:focus {
	border-color: var(--ezv-primary);
	outline: none;
	box-shadow: 0 0 0 3px rgba(44,95,46,.12);
}

.ezv-field textarea {
	height: 80px;
	resize: vertical;
}

/* ── Checkbox nuclear reset — strips ALL theme overrides back to browser defaults ── */
/* Applied before our own styles so the cascade works correctly.                    */
.ezv-container input[type="checkbox"],
.ezv-form input[type="checkbox"],
.ezv-schedule-grid input[type="checkbox"],
.ezv-checkbox-label input[type="checkbox"],
.ezv-checkbox-row input[type="checkbox"] {
	all: revert !important;
}

/* ── Re-apply our desired checkbox appearance on top of the reset ─────────────── */
.ezv-container input[type="checkbox"],
.ezv-form input[type="checkbox"],
.ezv-schedule-grid input[type="checkbox"],
.ezv-checkbox-label input[type="checkbox"],
.ezv-checkbox-row input[type="checkbox"] {
	display:        inline-block  !important;
	visibility:     visible       !important;
	opacity:        1             !important;
	pointer-events: auto          !important;
	position:       relative      !important;
	z-index:        9999          !important;
	appearance:     checkbox      !important;
	-webkit-appearance: checkbox  !important;
	width:          18px          !important;
	height:         18px          !important;
	min-width:      18px          !important;
	cursor:         pointer       !important;
	accent-color:   var(--ezv-primary, #2c5f2e) !important;
	margin:         0 4px 0 0     !important;
	flex-shrink:    0             !important;
	vertical-align: middle        !important;
}
.ezv-checkbox-row {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 8px;
}

.ezv-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 14px;
	cursor: pointer;
	line-height: 1.4;
}

.ezv-checkbox-label input[type="checkbox"] {
	width: 17px;
	height: 17px;
	margin-top: 1px;
	cursor: pointer;
	accent-color: var(--ezv-primary);
	flex-shrink: 0;
	/* Defend against theme overrides that hide or disable checkboxes */
	appearance: checkbox !important;
	-webkit-appearance: checkbox !important;
	opacity: 1 !important;
	pointer-events: auto !important;
	position: static !important;
	visibility: visible !important;
	display: inline-block !important;
}

/* ── Schedule grid — make entire cell clickable, not just the checkbox ─────────── */
.ezv-schedule-grid td.center {
	padding: 0 !important;
}
.ezv-schedule-grid td.center label {
	display:         flex;
	align-items:     center;
	justify-content: center;
	width:           100%;
	height:          100%;
	min-height:      44px;
	cursor:          pointer;
	padding:         8px 4px;
}
.ezv-schedule-grid {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	margin-top: 8px;
}

.ezv-schedule-grid th {
	padding: 8px 10px;
	background: var(--ezv-primary);
	color: #fff;
	text-align: center;
	font-weight: 600;
	font-size: 12px;
}

.ezv-schedule-grid th.day-col {
	text-align: left;
}

.ezv-schedule-grid td {
	padding: 9px 10px;
	border-bottom: 1px solid #f0ece6;
	text-align: center;
}

.ezv-schedule-grid td.day-col {
	text-align: left;
	font-weight: 600;
	color: #333;
}

.ezv-schedule-grid tr:last-child td {
	border-bottom: none;
}

.ezv-schedule-grid input[type="checkbox"] {
	width: 17px;
	height: 17px;
	accent-color: var(--ezv-primary);
	cursor: pointer;
	/* Defend against theme overrides */
	appearance: checkbox !important;
	-webkit-appearance: checkbox !important;
	opacity: 1 !important;
	pointer-events: auto !important;
	position: static !important;
	visibility: visible !important;
	display: inline-block !important;
}

/* ── Submit button ───────────────────────────────────────────────────────────── */
.ezv-submit-row {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid #f0ece6;
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.ezv-btn {
	display: inline-block;
	padding: 12px 28px;
	background: var(--ezv-primary);
	color: #fff;
	border: none;
	border-radius: 5px;
	font-size: 15px;
	font-family: var(--ezv-font);
	font-weight: 700;
	cursor: pointer;
	transition: opacity .15s, transform .1s;
	text-decoration: none;
}

.ezv-btn:hover {
	opacity: .88;
	transform: translateY(-1px);
}

.ezv-btn-secondary {
	background: transparent;
	border: 2px solid var(--ezv-primary);
	color: var(--ezv-primary);
}

.ezv-btn-danger {
	background: var(--ezv-btn);
}

/* ── Notices ─────────────────────────────────────────────────────────────────── */
.ezv-notice {
	padding: 14px 18px;
	border-radius: var(--ezv-radius);
	margin-bottom: 20px;
	font-size: 14px;
	line-height: 1.6;
}

.ezv-success {
	background: #e8f5e9;
	border-left: 4px solid var(--ezv-primary);
	color: #1e4620;
}

.ezv-error {
	background: #fdf1f0;
	border-left: 4px solid var(--ezv-btn);
	color: #7a1a1a;
}

.ezv-info {
	background: #e3f2fd;
	border-left: 4px solid #1565c0;
	color: #0d3c6e;
}

/* ── Portal: event cards ─────────────────────────────────────────────────────── */
.ezv-event-card {
	background: var(--ezv-secondary);
	border: 1px solid #e0dbd4;
	border-radius: var(--ezv-radius);
	padding: 20px 24px;
	margin-bottom: 18px;
}

.ezv-event-card h4 {
	font-family: var(--ezv-font);
	font-size: 16px;
	color: var(--ezv-primary);
	margin: 0 0 12px;
}

.ezv-shift-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.ezv-shift-list li {
	padding: 5px 0;
	font-size: 14px;
	border-bottom: 1px solid #e8e3dc;
	color: #444;
}

.ezv-shift-list li:last-child {
	border-bottom: none;
}

/* ── Unavailability records ──────────────────────────────────────────────────── */
.ezv-unavail-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.ezv-unavail-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 0;
	border-bottom: 1px solid #f0ece6;
	font-size: 13px;
	flex-wrap: wrap;
}

.ezv-unavail-item:last-child {
	border-bottom: none;
}

.ezv-unavail-date {
	font-weight: 700;
	color: var(--ezv-primary);
	min-width: 110px;
}

.ezv-unavail-shift {
	color: #555;
}

.ezv-unavail-event {
	color: #888;
	font-size: 12px;
}

/* ── Magic link login form ───────────────────────────────────────────────────── */
.ezv-login-box {
	background: #fff;
	border: 1px solid #e0dbd4;
	border-radius: var(--ezv-radius);
	box-shadow: var(--ezv-shadow);
	overflow: hidden;
	max-width: 480px;
	margin: 0 auto;
}

.ezv-login-box .ezv-form-header {
	text-align: center;
}

.ezv-login-box .ezv-form-body {
	text-align: center;
}

.ezv-login-box .ezv-field {
	text-align: left;
	max-width: 360px;
	margin: 0 auto 16px;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
	.ezv-form-header, .ezv-form-body {
		padding: 20px 18px;
	}
	.ezv-field-row {
		flex-direction: column;
		gap: 10px;
	}
	.ezv-btn {
		width: 100%;
		text-align: center;
	}
}

/* ── Pill toggle buttons ─────────────────────────────────────────────────── */
.ezv-pill {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 7px 16px; border: 2px solid #ccc; border-radius: 20px;
	background: #f8f6f2; color: #777; font-size: 13px;
	font-family: var(--ezv-font); cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
	user-select: none; white-space: nowrap; line-height: 1.3;
	text-decoration: none; box-shadow: none; outline: none;
}
.ezv-pill:hover { border-color: var(--ezv-primary); color: var(--ezv-primary); }
.ezv-pill--on { background: var(--ezv-primary); border-color: var(--ezv-primary); color: #fff; }
.ezv-pill--on:hover { opacity: .88; color: #fff; }
.ezv-pill--compact {
	width: 38px; height: 38px; min-width: 38px;
	padding: 0; border-radius: 50%; font-size: 16px; font-weight: 700;
}
.ezv-pill-group { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.ezv-schedule-grid td.center { padding: 6px 4px; }

/* ── Portal login: email-sent confirmation screen ─────────────────────────── */
.ezv-sent-confirm {
	background: #fff; border: 1px solid #e0dbd4;
	border-radius: var(--ezv-radius); box-shadow: var(--ezv-shadow);
	overflow: hidden; max-width: 480px; margin: 0 auto; text-align: center;
}
.ezv-sent-confirm .ezv-form-header { text-align: center; }
.ezv-sent-confirm-body { padding: 32px 36px; }
.ezv-sent-icon { font-size: 52px; line-height: 1; margin-bottom: 16px; }
.ezv-sent-confirm h3 { font-family: var(--ezv-font); font-size: 20px; color: var(--ezv-primary); margin: 0 0 12px; }
.ezv-sent-confirm p { font-size: 14px; color: #555; line-height: 1.7; margin: 0 0 12px; }
.ezv-sent-confirm .ezv-try-again { display: inline-block; margin-top: 18px; font-size: 13px; color: #aaa; }
.ezv-sent-confirm .ezv-try-again a { color: var(--ezv-primary); }
