/* ZIMFundi Schools – components. Themes can override the tokens. */
:root {
	--zfs-ink: #15231c;
	--zfs-muted: #5d6b63;
	--zfs-line: #e4e1d6;
	--zfs-bg: #faf8f2;
	--zfs-card: #ffffff;
	--zfs-green: #17573a;
	--zfs-green-2: #0f3d29;
	--zfs-ochre: #c2541a;
	--zfs-gold: #e0a826;
	--zfs-soft: #eef3ee;
	--zfs-radius: 14px;
	--zfs-shadow: 0 1px 2px rgba(21, 35, 28, .06), 0 6px 20px rgba(21, 35, 28, .06);
}

.zfs-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .7em 1.2em; border-radius: 999px; font-weight: 600; font-size: .95rem; line-height: 1.1; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.zfs-btn--primary { background: var(--zfs-green); color: #fff; }
.zfs-btn--primary:hover { background: var(--zfs-green-2); color: #fff; }
.zfs-btn--ghost { background: transparent; color: var(--zfs-green); border-color: currentColor; }
.zfs-btn--ghost:hover { background: var(--zfs-soft); }
.zfs-btn--accent { background: var(--zfs-ochre); color: #fff; }
.zfs-btn--accent:hover { filter: brightness(.92); color: #fff; }

/* Search form */
.zfs-search { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; background: var(--zfs-card); padding: 16px; border-radius: var(--zfs-radius); box-shadow: var(--zfs-shadow); }
.zfs-search--compact { grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; }
.zfs-field { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; font-weight: 600; color: var(--zfs-muted); text-transform: uppercase; letter-spacing: .04em; }
.zfs-field input, .zfs-field select { font: inherit; font-size: .98rem; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--zfs-ink); padding: .62em .7em; border: 1.5px solid var(--zfs-line); border-radius: 10px; background: #fff; width: 100%; min-width: 0; }
.zfs-field input:focus, .zfs-field select:focus { outline: none; border-color: var(--zfs-green); box-shadow: 0 0 0 3px rgba(23, 87, 58, .15); }
.zfs-field--q { grid-column: span 2; }
.zfs-search__actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 900px) {
	.zfs-search--compact { grid-template-columns: 1fr 1fr; }
	.zfs-search--compact .zfs-field--q { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
	.zfs-search { grid-template-columns: 1fr; }
	.zfs-field--q { grid-column: auto; }
	.zfs-search--compact { grid-template-columns: 1fr; }
	.zfs-search__actions .zfs-btn { flex: 1; }
}

/* Cards */
.zfs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.zfs-card { background: var(--zfs-card); border-radius: var(--zfs-radius); overflow: hidden; box-shadow: var(--zfs-shadow); transition: transform .15s, box-shadow .15s; }
.zfs-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(21,35,28,.08), 0 12px 28px rgba(21,35,28,.1); }
.zfs-card__link { display: block; color: inherit; text-decoration: none; height: 100%; }
.zfs-card__media { position: relative; aspect-ratio: 16 / 10; background: var(--zfs-soft); overflow: hidden; }
.zfs-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zfs-card__media.is-empty { background: linear-gradient(135deg, var(--zfs-green) 0%, var(--zfs-green-2) 100%); display: grid; place-items: center; }
.zfs-card__media.is-empty::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 14px 14px; }
.zfs-card__initials { font-family: var(--zfs-display, Georgia, serif); font-size: 2.6rem; font-weight: 600; color: rgba(255,255,255,.92); letter-spacing: .02em; position: relative; z-index: 1; }
.zfs-chip { position: absolute; z-index: 2; top: 10px; font-size: .72rem; font-weight: 700; padding: .32em .7em; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--zfs-ink); }
.zfs-chip--type { left: 10px; }
.zfs-chip--unclaimed { right: 10px; background: rgba(21,35,28,.72); color: #fff; }
.zfs-chip--verified { right: 10px; background: var(--zfs-gold); color: #2a1d00; }
.zfs-card__body { padding: 14px 16px 16px; position: relative; }
.zfs-card__logo { position: absolute; right: 14px; top: -26px; width: 48px; height: 48px; border-radius: 50%; border: 3px solid #fff; background: #fff; object-fit: contain; box-shadow: var(--zfs-shadow); }
.zfs-card__title { font-size: 1.05rem; line-height: 1.3; margin: 0 0 4px; padding-right: 44px; }
.zfs-card__loc { margin: 0; color: var(--zfs-muted); font-size: .9rem; }
.zfs-card__dist { margin: 6px 0 0; font-size: .86rem; color: var(--zfs-ochre); font-weight: 600; }
.zfs-card__dist::before { content: "◎ "; }
.zfs-card__tags { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.zfs-card__tags span { font-size: .74rem; background: var(--zfs-soft); color: var(--zfs-green-2); padding: .25em .6em; border-radius: 6px; font-weight: 600; }

/* Provinces */
.zfs-provinces { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 45%), 1fr)); gap: 12px; }
.zfs-province-tile { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: var(--zfs-radius); background: var(--zfs-card); border: 1.5px solid var(--zfs-line); text-decoration: none; color: var(--zfs-ink); transition: border-color .15s, background .15s; }
.zfs-province-tile:hover { border-color: var(--zfs-green); background: var(--zfs-soft); }
.zfs-province-tile strong { font-size: 1.02rem; }
.zfs-province-tile span { color: var(--zfs-muted); font-size: .88rem; }

/* Maps */
.zfs-map, .zfs-school-map, .zfs-picker { width: 100%; border-radius: var(--zfs-radius); overflow: hidden; z-index: 0; background: var(--zfs-soft); }
.zfs-school-map { height: 340px; }
.zfs-picker { height: 380px; margin: 10px 0; }
.zfs-pin span { display: block; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--zfs-green); border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.zfs-pin.is-verified span { background: var(--zfs-gold); }
.zfs-pin.is-town span { background: var(--zfs-ochre); border-radius: 50%; }
.zfs-pin.is-you span { background: #2563eb; border-radius: 50%; }
.zfs-pin.is-school span { background: var(--zfs-green); width: 26px; height: 26px; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background-color: rgba(23, 87, 58, .25) !important; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background-color: var(--zfs-green) !important; color: #fff !important; font-weight: 700; }

/* Forms & panels */
.zfs-form { display: grid; gap: 14px; }
.zfs-form label { display: grid; gap: 5px; font-weight: 600; font-size: .92rem; color: var(--zfs-ink); }
.zfs-form input[type=text], .zfs-form input[type=email], .zfs-form input[type=tel], .zfs-form input[type=url], .zfs-form input[type=number], .zfs-form input[type=password], .zfs-form select, .zfs-form textarea { font: inherit; font-weight: 400; padding: .65em .75em; border: 1.5px solid var(--zfs-line); border-radius: 10px; background: #fff; width: 100%; box-sizing: border-box; }
.zfs-form input:focus, .zfs-form select:focus, .zfs-form textarea:focus { outline: none; border-color: var(--zfs-green); box-shadow: 0 0 0 3px rgba(23,87,58,.15); }
.zfs-form .zfs-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.zfs-panel { background: var(--zfs-card); border: 1px solid var(--zfs-line); border-radius: var(--zfs-radius); padding: 20px; }
.zfs-panel h2, .zfs-panel h3 { margin-top: 0; }
.zfs-label { font-weight: 700; margin: 14px 0 6px; font-size: .9rem; }
.zfs-muted { color: var(--zfs-muted); }
.zfs-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--zfs-ochre); margin: 0 0 4px; }
.zfs-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.zfs-grid-3 { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 640px) { .zfs-grid-2, .zfs-grid-3 { grid-template-columns: 1fr; } }
.zfs-options { display: flex; flex-wrap: wrap; gap: 8px; }
.zfs-pill { display: inline-flex !important; cursor: pointer; }
.zfs-pill input { position: absolute; opacity: 0; pointer-events: none; }
.zfs-pill span { padding: .45em .9em; border-radius: 999px; border: 1.5px solid var(--zfs-line); font-weight: 600; font-size: .88rem; background: #fff; }
.zfs-pill input:checked + span { background: var(--zfs-green); border-color: var(--zfs-green); color: #fff; }
.zfs-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(23,87,58,.25); }
.zfs-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 8px; }
.zfs-gallery-edit { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.zfs-gallery-edit__item { display: grid; gap: 4px; font-size: .8rem; font-weight: 500 !important; }
.zfs-gallery-edit__item img { width: 110px; height: 80px; object-fit: cover; border-radius: 8px; }
.zfs-sticky-save { position: sticky; bottom: 0; background: rgba(250,248,242,.96); padding: 12px 0; display: flex; gap: 10px; border-top: 1px solid var(--zfs-line); z-index: 5; }
.zfs-hp { position: absolute !important; left: -9999px; }
.zfs-account { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.zfs-account #loginform p { display: grid; gap: 5px; }
.zfs-account #loginform input[type=text], .zfs-account #loginform input[type=password] { padding: .65em .75em; border: 1.5px solid var(--zfs-line); border-radius: 10px; font: inherit; }
.zfs-account #loginform .login-remember { display: block; }
.zfs-account #wp-submit { background: var(--zfs-green); color: #fff; border: 0; border-radius: 999px; padding: .7em 1.4em; font-weight: 600; cursor: pointer; }

/* Notices */
.zfs-notice { padding: 14px 16px; border-radius: 10px; margin: 0 0 16px; border-left: 4px solid var(--zfs-green); background: var(--zfs-soft); }
.zfs-notice--error { border-color: #b42318; background: #fdf0ee; }
.zfs-notice--warning { border-color: var(--zfs-gold); background: #fdf7e6; }
.zfs-notice--success { border-color: #1a7f37; background: #ecf7ef; }

/* Dashboard */
.zfs-dash__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.zfs-dash__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.zfs-dash__list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px; background: var(--zfs-card); border: 1px solid var(--zfs-line); border-radius: var(--zfs-radius); }
.zfs-dash__list li > div:first-child { display: grid; gap: 2px; }
.zfs-dash__actions { display: flex; gap: 8px; }

/* Lightbox */
.zfs-lightbox { position: fixed; inset: 0; background: rgba(10,16,13,.88); display: grid; place-items: center; z-index: 9999; cursor: zoom-out; padding: 16px; }
.zfs-lightbox img { max-width: 100%; max-height: 90vh; border-radius: 8px; }
