/* ════════════════════════════════════════════════════════════
   Flock Shared Component System — v1.0
   Requires: /flock-tokens.css  (must load first)
   Fonts:    Lora (serif) · DM Sans (sans-serif) via Google Fonts

   Naming: all shared classes use the `fl-` prefix so they never
   conflict with existing page-specific classes during migration.

   Usage: link this file AFTER flock-tokens.css and Google Fonts,
   and BEFORE each page's own <style> block.
   ════════════════════════════════════════════════════════════ */


/* ── 1. NAVIGATION ──────────────────────────────────────────── */

/* White sticky nav — standard across all public pages */
.fl-nav {
  background: var(--wh);
  border-bottom: 1px solid var(--bo);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.fl-nav-logo {
  font-family: "Lora", serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--br);
  text-decoration: none;
}

/* Back link — used on event-page, course-page, campaigns */
.fl-nav-back {
  font-size: 13px;
  font-weight: 500;
  color: var(--bm);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.fl-nav-back:hover { color: var(--br); }

/* Icon button group — used on org-page for share/install */
.fl-nav-actions { display: flex; gap: 8px; }

.fl-nav-icon-btn {
  width: 34px;
  height: 34px;
  background: var(--sa);
  border: 1px solid var(--bo);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
}
.fl-nav-icon-btn:hover { background: var(--br); border-color: var(--br); }
.fl-nav-icon-btn img {
  width: 16px; height: 16px;
  filter: brightness(0) opacity(.6);
  transition: filter .15s;
}
.fl-nav-icon-btn:hover img { filter: brightness(0) invert(1) opacity(.9); }


/* ── 2. CARDS ───────────────────────────────────────────────── */

/* Base content card — used everywhere for content sections */
.fl-card {
  background: var(--wh);
  border-radius: var(--r-lg);   /* 14px */
  border: 1px solid var(--bo);
  overflow: hidden;
}

/* Hero card — larger radius for image/header areas */
.fl-card-hero {
  background: var(--wh);
  border-radius: var(--r-xl);   /* 16px */
  border: 1px solid var(--bo);
  overflow: hidden;
}

/* Card header — title bar with optional action */
.fl-card-hd {
  padding: 14px 20px;
  border-bottom: 1px solid var(--bo);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Compact card header — tighter padding for hub/sidebar cards */
.fl-card-hd--compact { padding: 14px 18px 12px; }

/* Card body */
.fl-card-bd { padding: 20px; }

/* Compact card body — tighter padding for hub cards */
.fl-card-bd--compact { padding: 16px 18px; }

/* Card title */
.fl-card-title {
  font-family: "Lora", serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--br);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* See all link — used in card headers alongside titles */
.fl-see-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--bm);
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}
.fl-see-all:hover { color: var(--br); }

/* Sticky side panel — right column on detail pages */
.fl-side-panel {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Panel card — card within a sticky side panel */
.fl-panel-card {
  background: var(--wh);
  border-radius: var(--r-xl);
  padding: 20px;
  border: 1px solid var(--bo);
}

.fl-panel-title {
  font-family: "Lora", serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--br);
  margin-bottom: 14px;
}


/* ── 3. BUTTONS ─────────────────────────────────────────────── */

/* Primary CTA — Lora serif, full-width, used for register/donate/enrol.
   The Lora font gives transaction-weight actions a distinctive branded feel. */
.fl-btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--br);
  color: var(--sa);
  border: none;
  border-radius: var(--r-md);   /* 10px */
  font-family: "Lora", serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: opacity .2s;
  margin-top: 4px;
}
.fl-btn-primary:hover { opacity: .88; }
.fl-btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.fl-btn-primary img {
  width: 16px; height: 16px;
  filter: brightness(0) invert(1) opacity(.85);
  flex-shrink: 0;
}

/* Nav CTA — smaller primary, used in navbars */
.fl-btn-nav-cta {
  background: var(--br);
  color: var(--sa);
  padding: 9px 16px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .2s;
  font-family: "DM Sans", sans-serif;
}
.fl-btn-nav-cta:hover { opacity: .88; }

/* Secondary button — sand background, used for contact/link buttons */
.fl-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  background: var(--sa);
  color: var(--br);
  border: 1px solid var(--bo);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  font-family: "DM Sans", sans-serif;
}
.fl-btn-secondary:hover { background: var(--br); color: var(--sa); border-color: var(--br); }
.fl-btn-secondary img {
  width: 14px; height: 14px;
  filter: brightness(0) opacity(.6);
  transition: filter .15s;
  flex-shrink: 0;
}
.fl-btn-secondary:hover img { filter: brightness(0) invert(1) opacity(.9); }

/* Ghost button — white background, used for Share/Save/Add-to-cal action rows */
.fl-btn-ghost {
  flex: 1;
  padding: 10px 8px;
  background: var(--wh);
  border: 1.5px solid var(--bo);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--br);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all .15s;
  font-family: "DM Sans", sans-serif;
  text-decoration: none;
}
.fl-btn-ghost:hover { background: var(--br); color: var(--sa); border-color: var(--br); }
.fl-btn-ghost img {
  width: 14px; height: 14px;
  opacity: .65;
  transition: filter .15s, opacity .15s;
  flex-shrink: 0;
}
.fl-btn-ghost:hover img { filter: invert(1) brightness(2); opacity: .9; }

/* Tab CTA — full-width dark CTA inside tab panels (Donate, Education) */
.fl-btn-tab-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 12px 18px;
  background: var(--br);
  color: var(--sa);
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s;
  font-family: "DM Sans", sans-serif;
}
.fl-btn-tab-cta:hover { opacity: .88; }
.fl-btn-tab-cta img {
  width: 16px; height: 16px;
  filter: brightness(0) invert(1) opacity(.85);
  flex-shrink: 0;
}

/* Follow button — org-page hero, inline page actions */
.fl-btn-follow {
  background: var(--br);
  color: var(--sa);
  border: none;
  padding: 10px 24px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .3px;
  font-family: "DM Sans", sans-serif;
}
.fl-btn-follow:hover { opacity: .85; }
.fl-btn-follow.following {
  background: transparent;
  color: var(--bm);
  border: 1.5px solid var(--bo);
}

/* Action row — wraps .fl-btn-ghost buttons */
.fl-action-row {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}


/* ── 4. FORMS ───────────────────────────────────────────────── */

/* Field wrapper */
.fl-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.fl-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--br);
}

/* Base input + select + textarea */
.fl-input,
.fl-select,
.fl-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--bo);
  border-radius: var(--r-sm);
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  color: var(--br);
  background: var(--wh);
  outline: none;
  transition: border-color .2s;
}
.fl-input:focus,
.fl-select:focus,
.fl-textarea:focus {
  border-color: var(--br);
  box-shadow: var(--focus-ring);
}
.fl-input.is-error,
.fl-select.is-error { border-color: var(--er); }

/* Textarea specific */
.fl-textarea { resize: vertical; min-height: 90px; line-height: 1.55; }

/* Select — custom chevron arrow */
.fl-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b5e3c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}

/* Field hint */
.fl-hint { font-size: 11px; color: var(--bm); }

/* Form section label — used to group fields without a card header */
.fl-form-section {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--bm);
  margin: 14px 0 8px;
}

/* Toggle row — checkbox + label with sub-text */
.fl-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--sa);
  border: 1.5px solid var(--bo);
  border-radius: 10px;
  margin-bottom: 9px;
  cursor: pointer;
}
.fl-toggle-row input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--br);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.fl-toggle-label { font-size: 13px; font-weight: 600; color: var(--br); }
.fl-toggle-sub { font-size: 11px; color: var(--bm); font-weight: 300; margin-top: 1px; }

/* Gift Aid — donation-specific section */
.fl-gift-aid {
  background: #fef9ee;
  border: 1px solid var(--gl);
  border-radius: 10px;
  padding: 13px;
  margin-bottom: 10px;
  display: none;
}
.fl-gift-aid.open { display: block; }
.fl-gift-aid-title { font-size: 13px; font-weight: 700; color: #7a5210; margin-bottom: 5px; }
.fl-gift-aid-legal { font-size: 11px; color: #9a6b10; line-height: 1.55; margin-bottom: 10px; }

/* Amount grid — donation amount selector */
.fl-amt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-bottom: 12px;
}
.fl-amt-btn {
  padding: 11px 6px;
  background: var(--sa);
  border: 1.5px solid var(--bo);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--br);
  cursor: pointer;
  text-align: center;
  transition: all .15s;
  font-family: "DM Sans", sans-serif;
}
.fl-amt-btn:hover,
.fl-amt-btn.sel { background: var(--br); color: var(--sa); border-color: var(--br); }

/* Custom amount input — pound-prefixed */
.fl-custom-amt {
  position: relative;
  margin-bottom: 12px;
  display: none;
}
.fl-custom-amt.open { display: block; }
.fl-custom-amt input {
  width: 100%;
  padding: 11px 12px 11px 28px;
  border: 1.5px solid var(--br);
  border-radius: 10px;
  font-family: "Lora", serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--br);
  outline: none;
  background: var(--sa);
}
.fl-custom-amt::before {
  content: "£";
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  font-weight: 700;
  color: var(--bm);
  font-family: "Lora", serif;
}


/* ── 5. META ROWS ───────────────────────────────────────────── */

/* Icon + label + value — used for date, location, price, schedule */
.fl-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.fl-meta-icon {
  width: 38px; height: 38px;
  background: var(--sa);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--bo);
}
.fl-meta-icon img { width: 20px; height: 20px; opacity: .65; }

.fl-meta-text { flex: 1; min-width: 0; }

.fl-meta-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--bm);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 2px;
}

.fl-meta-value { font-size: 14px; font-weight: 500; color: var(--br); }

.fl-meta-sub { font-size: 12px; color: var(--bm); font-weight: 300; margin-top: 2px; }


/* ── 6. TABS ────────────────────────────────────────────────── */

/* Tab strip — scrollable horizontal row with underline active state */
.fl-tabs {
  background: var(--wh);
  border-bottom: 1px solid var(--bo);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 24px;
}
.fl-tabs::-webkit-scrollbar { display: none; }

.fl-tab {
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bm);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  transition: all .15s;
  font-family: "DM Sans", sans-serif;
}
.fl-tab:hover { color: var(--br); }
.fl-tab.active { color: var(--br); border-bottom-color: var(--br); }

/* Filter pills — used for announcement type filters, not navigation */
.fl-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.fl-filter {
  border: 1.5px solid var(--bo);
  background: var(--wh);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bm);
  cursor: pointer;
  white-space: nowrap;
}
.fl-filter.active { background: var(--br); color: var(--sa); border-color: var(--br); }


/* ── 7. ORG BAR ─────────────────────────────────────────────── */

/* Attribution row — shown below the event/course/campaign title */
.fl-org-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--bo);
  margin-top: 8px;
}

.fl-org-av {
  width: 38px; height: 38px;
  background: var(--br);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Lora", serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--sa);
  flex-shrink: 0;
}

.fl-org-name { font-size: 14px; font-weight: 600; color: var(--br); }

.fl-org-link {
  font-size: 12px;
  color: var(--bm);
  text-decoration: none;
}
.fl-org-link:hover { color: var(--br); }

.fl-org-follow {
  margin-left: auto;
  background: var(--sa);
  border: 1.5px solid var(--bo);
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--br);
  cursor: pointer;
  transition: all .15s;
  font-family: "DM Sans", sans-serif;
}
.fl-org-follow:hover { background: var(--br); color: var(--sa); border-color: var(--br); }


/* ── 8. POSTER / IMAGE ──────────────────────────────────────── */

/* Poster container — fixed-height image area within header cards */
.fl-poster-wrap {
  width: 100%;
  height: 280px;
  position: relative;
  overflow: hidden;
  background: var(--sd);
}

/* Uploaded poster image — contained, never cropped */
.fl-poster-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* View full poster — overlaid bottom-left button when image is present */
.fl-poster-btn {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,.5);
  border: none;
  border-radius: 7px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background .2s;
  z-index: 2;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .2px;
}
.fl-poster-btn:hover { background: rgba(0,0,0,.72); }
.fl-poster-btn img {
  width: 13px; height: 13px;
  filter: invert(1);
  opacity: .9;
  display: block;
  flex-shrink: 0;
}

/* Date badge — top-right corner overlay on poster */
.fl-date-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--wh);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.fl-date-badge-day {
  font-family: "Lora", serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--br);
  line-height: 1;
}
.fl-date-badge-month {
  font-size: 11px;
  font-weight: 700;
  color: var(--bm);
  text-transform: uppercase;
}

/* Lightbox — full-screen poster view */
.fl-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: pointer;
}
.fl-lightbox.open { display: flex; }
.fl-lightbox-img {
  max-width: min(90vw, 760px);
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  cursor: default;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
}
.fl-lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 501;
  line-height: 1;
}
.fl-lightbox-close:hover { background: rgba(255,255,255,.28); }


/* ── 9. PROGRESS ────────────────────────────────────────────── */

/* Fundraising progress bar — used in campaigns and campaign cards */
.fl-progress-bar {
  height: 6px;
  background: var(--bo);
  border-radius: 100px;
  overflow: hidden;
  margin: 8px 0 7px;
}
.fl-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--br), var(--bm));
  border-radius: 100px;
  transition: width .8s ease;
}
.fl-progress-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.fl-progress-stat { font-size: 12px; color: var(--bm); }
.fl-progress-stat strong { color: var(--br); font-weight: 600; }

/* Capacity bar — thin green bar for event/course seat availability */
.fl-capacity-bar {
  height: 5px;
  background: var(--bo);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 6px;
}
.fl-capacity-fill {
  height: 100%;
  border-radius: 100px;
  transition: width .5s;
}
.fl-capacity-fill--good  { background: var(--su); }
.fl-capacity-fill--low   { background: #e8a020; }
.fl-capacity-fill--full  { background: var(--er); }


/* ── 10. EMPTY STATES ───────────────────────────────────────── */

/* Standard empty state — inside an existing card's .fl-card-bd */
.fl-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--bm);
}

.fl-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.fl-empty-icon img { filter: brightness(0) opacity(.3); }

.fl-empty-title {
  font-family: "Lora", serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--br);
  margin-bottom: 6px;
}

.fl-empty-sub {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
}

.fl-empty-cta { margin-top: 16px; }


/* ── 11. SUCCESS STATE ──────────────────────────────────────── */

/* Post-transaction success — replaces the booking/donation panel */
.fl-success {
  background: var(--wh);
  border-radius: var(--r-xl);
  padding: 32px 24px;
  border: 1px solid var(--bo);
  text-align: center;
  display: none;
}
.fl-success.open { display: block; }

.fl-success-icon {
  width: 72px; height: 72px;
  background: var(--sa);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  border: 2px solid var(--bo);
}
.fl-success-icon img { width: 32px; height: 32px; opacity: .7; }

.fl-success-title {
  font-family: "Lora", serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--br);
  margin-bottom: 8px;
}

.fl-success-sub {
  font-size: 13px;
  color: var(--bm);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Summary detail table within success */
.fl-success-detail {
  background: var(--sa);
  border-radius: 10px;
  padding: 14px;
  text-align: left;
  margin-bottom: 16px;
}
.fl-success-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--bo);
}
.fl-success-row:last-child { border-bottom: none; }
.fl-success-key { color: var(--bm); font-weight: 300; }
.fl-success-val { font-weight: 600; color: var(--br); }


/* ── 12. TYPOGRAPHY UTILITIES ───────────────────────────────── */

/* Section heading within cards */
.fl-section-title {
  font-family: "Lora", serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--br);
  margin-bottom: 10px;
}

/* Body / description text */
.fl-body-text {
  font-size: 13px;
  color: var(--bm);
  line-height: 1.7;
  font-weight: 300;
}

/* Badge / pill labels */
.fl-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: .3px;
  white-space: nowrap;
}
.fl-badge--success  { background: #eef7ee; color: var(--su); }
.fl-badge--warning  { background: #fef3e2; color: #9a6b10; }
.fl-badge--neutral  { background: var(--sa); color: var(--bm); }
.fl-badge--danger   { background: #fef2f2; color: var(--er); }
.fl-badge--gold     { background: #fef9ee; color: #7a5210; border: 1px solid var(--gl); }


/* ── 13. SPINNERS + LOADING ─────────────────────────────────── */

.fl-spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--bo);
  border-top-color: var(--br);
  border-radius: 50%;
  animation: fl-spin .7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes fl-spin { to { transform: rotate(360deg); } }

.fl-loading {
  text-align: center;
  padding: 40px;
  color: var(--bm);
  font-size: 14px;
}


/* ── 14. TOAST ──────────────────────────────────────────────── */

.fl-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--br);
  color: var(--sa);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  z-index: 300;
  transition: transform .3s;
  box-shadow: 0 8px 24px rgba(61,32,16,.3);
  white-space: nowrap;
}
.fl-toast.show { transform: translateX(-50%) translateY(0); }


/* ── 15. LAYOUT UTILITIES ───────────────────────────────────── */

/* Standard detail page container — event, course, campaign */
.fl-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px;
}

/* Wider hub container — org-page */
.fl-page-wide {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px;
}

/* Narrow form container — donations, madrassah */
.fl-page-narrow {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* Two-column detail layout: main content | sticky side panel */
.fl-detail-grid {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

/* Hub layout: fixed sidebar | scrollable content */
.fl-hub-grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}
.fl-hub-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fl-hub-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* Horizontal divider */
.fl-divider {
  border: none;
  border-top: 1px solid var(--bo);
  margin: 16px 0;
}


/* ── 16. RESPONSIVE ─────────────────────────────────────────── */

@media (max-width: 768px) {
  /* Nav */
  .fl-nav { padding: 14px 16px; }

  /* Poster */
  .fl-poster-wrap { height: 220px; }

  /* Detail grid — collapses to single column */
  .fl-detail-grid {
    display: block;
    padding: 0 0 24px;
    max-width: 100%;
  }
  .fl-side-panel {
    position: static;
    padding: 14px 16px 0;
  }

  /* Hub grid — sidebar moves below content */
  .fl-hub-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .fl-hub-sidebar { order: 2; }
  .fl-hub-content { order: 1; }

  /* Toast */
  .fl-toast {
    max-width: calc(100vw - 32px);
    white-space: normal;
    text-align: center;
  }

  /* Primary button stays sticky on mobile within detail pages */
  .fl-btn-primary--sticky {
    position: sticky;
    bottom: 12px;
    z-index: 20;
    box-shadow: 0 8px 24px rgba(61,32,16,.18);
  }

  /* Touch targets — 44px minimum for reliable tap accuracy */
  .fl-nav-icon-btn { width: 44px; height: 44px; }
  .fl-filter       { min-height: 44px; padding: 10px 18px; }
  .fl-btn-follow   { min-height: 44px; }
  .fl-btn-ghost    { min-height: 42px; }

  /* iOS form zoom prevention — font-size < 16px triggers auto-zoom on focus */
  .fl-input,
  .fl-select,
  .fl-textarea     { font-size: 16px; }
}

@media (max-width: 480px) {
  .fl-amt-grid { grid-template-columns: repeat(2, 1fr); }
}
