/* FND Connect — Volunteer Portal styles.
   Kept as a separate file (served fresh by the app, not the synced httpdocs
   copy) so portal styling never depends on re-running the asset sync. */

/* ============================================================
   Volunteer Portal
   ============================================================ */

/* Sub-navigation — scrolls horizontally on small screens */
.vol-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 6px 18px rgba(0, 43, 95, 0.05);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.vol-nav::-webkit-scrollbar { display: none; }
.vol-nav a {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--fnd-navy);
  text-decoration: none;
}
.vol-nav a:not(.is-active):hover { background: var(--panel); }
.vol-nav a.is-active { background: var(--fnd-navy); color: #fff; }
.vol-nav__logout { margin-left: auto; flex: 0 0 auto; }
.vol-nav__logout button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--fnd-navy);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font: 700 0.9rem inherit;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.vol-nav__logout button:hover { border-color: var(--fnd-magenta); color: var(--fnd-magenta); }

/* Module cards (dashboard tiles) */
.vol-modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}
.vol-module {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 43, 95, 0.05);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
a.vol-module:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(0, 43, 95, 0.12); border-color: var(--fnd-magenta); }
.vol-module__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--fnd-navy), var(--fnd-magenta));
  color: #fff;
}
.vol-module__icon svg { width: 24px; height: 24px; }
.vol-module h3 { margin: 0; color: var(--fnd-navy); font-size: 1.15rem; }
.vol-module p { margin: 0; color: var(--text); font-size: 0.95rem; }
.vol-module__meta { margin-top: auto; color: var(--muted); font-size: 0.85rem; font-weight: 700; padding-top: 0.25rem; }

/* Panels */
.vol-panel {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 43, 95, 0.05);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.vol-panel__head {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem;
  align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.vol-panel__head h2 { margin: 0; font-size: 1.1rem; color: var(--fnd-navy); }
.vol-panel__body { padding: 1.25rem; }

.vol-section-title { font-size: 1.1rem; color: var(--fnd-navy); margin: 1.75rem 0 0.85rem; }

/* Stats */
.vol-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.75rem; }
.vol-stat { text-align: center; padding: 1rem; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.vol-stat b { display: block; font-size: 1.7rem; color: var(--fnd-navy); line-height: 1.1; }
.vol-stat span { color: var(--muted); font-size: 0.85rem; }

/* Chips and badges */
.vol-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.vol-chip { background: var(--pale); color: var(--fnd-magenta); border-radius: 999px; padding: 0.28rem 0.7rem; font-size: 0.8rem; font-weight: 700; }
.vol-badge { display: inline-block; border-radius: 999px; padding: 0.2rem 0.65rem; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; }
.vol-badge--approved, .vol-badge--shipped { background: #e6f5ec; color: #1c7a44; }
.vol-badge--pending, .vol-badge--new { background: #fff4e0; color: #9a5b00; }
.vol-badge--processing { background: #e7eefb; color: #1f57c3; }
.vol-badge--draft, .vol-badge--closed, .vol-badge--cancelled { background: #eef2f7; color: #52617a; }
.vol-badge--rejected { background: #fde7ee; color: #b1003f; }

/* Resource bank */
.vol-resources { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 1rem; }
.vol-resource { display: flex; flex-direction: column; padding: 1.1rem; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: 0 6px 18px rgba(0, 43, 95, 0.04); }
.vol-resource__cat { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fnd-magenta); margin-bottom: 0.3rem; }
.vol-resource h4 { margin: 0 0 0.3rem; font-size: 1rem; color: var(--fnd-navy); }
.vol-resource p { margin: 0 0 0.75rem; font-size: 0.9rem; color: var(--muted); }
.vol-resource a { margin-top: auto; font-weight: 800; color: var(--fnd-navy); text-decoration: none; }
.vol-resource a:hover { color: var(--fnd-magenta); }

/* Portal forms */
.vol-form label { display: block; margin-bottom: 0.85rem; }
.vol-form label > span { display: block; font-weight: 700; font-size: 0.85rem; color: var(--fnd-navy); margin-bottom: 0.3rem; }
.vol-form input[type="text"],
.vol-form input[type="email"],
.vol-form input[type="tel"],
.vol-form input[type="number"],
.vol-form input[type="date"],
.vol-form input[type="password"],
.vol-form input[type="file"],
.vol-form select,
.vol-form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.vol-form textarea { resize: vertical; }
.vol-form input:focus, .vol-form select:focus, .vol-form textarea:focus {
  outline: none; border-color: var(--fnd-navy); box-shadow: 0 0 0 3px rgba(0, 43, 95, 0.12);
}
.vol-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 1rem; }
.vol-form .vol-check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 500; }
.vol-form .vol-check input { width: auto; margin-top: 0.2rem; flex: 0 0 auto; }
.vol-form .vol-hint { color: var(--muted); font-size: 0.88rem; margin: -0.4rem 0 0.85rem; }

/* Role picker */
.vol-rolepick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0.6rem; }
.vol-rolepick label { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0; padding: 0.8rem; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; background: #fff; }
.vol-rolepick label:hover { border-color: var(--fnd-navy); }
.vol-rolepick label:has(input:checked) { border-color: var(--fnd-magenta); background: var(--pale); }
.vol-rolepick input { width: auto; margin-top: 0.2rem; flex: 0 0 auto; }
.vol-rolepick strong { color: var(--fnd-navy); display: block; }
.vol-rolepick small { color: var(--muted); }

/* Lists of fundraisers / groups */
.vol-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.vol-card { border: 1px solid var(--border); border-radius: 16px; background: #fff; padding: 1.1rem; box-shadow: 0 8px 24px rgba(0, 43, 95, 0.05); display: flex; flex-direction: column; }
.vol-card h3 { margin: 0.3rem 0; color: var(--fnd-navy); font-size: 1.1rem; }
.vol-card__media { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; margin-bottom: 0.75rem; }

/* Progress */
.vol-progress { background: #eef2f7; border-radius: 999px; height: 9px; overflow: hidden; margin: 0.45rem 0 0.6rem; }
.vol-progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--fnd-navy), var(--fnd-magenta)); border-radius: 999px; }

/* Actions / jump pills / empty state */
.vol-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.vol-jump { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.vol-jump a { font-size: 0.85rem; font-weight: 700; color: var(--fnd-navy); background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 0.35rem 0.8rem; text-decoration: none; }
.vol-jump a:hover { border-color: var(--fnd-magenta); color: var(--fnd-magenta); }
.vol-empty { text-align: center; padding: 1.75rem 1.25rem; color: var(--muted); border: 1px dashed var(--border); border-radius: 14px; background: var(--panel); }

/* Responsive table → stacked cards on phones */
.vol-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vol-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.vol-table th { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 2px solid var(--border); color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
.vol-table td { padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
@media (max-width: 640px) {
  .vol-table, .vol-table tbody, .vol-table tr, .vol-table td { display: block; width: 100%; }
  .vol-table thead { position: absolute; left: -9999px; }
  .vol-table tr { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 0.75rem; padding: 0.35rem 0.85rem; }
  .vol-table td { border: none; padding: 0.4rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .vol-table td::before { content: attr(data-label); font-weight: 700; color: var(--fnd-navy); text-align: left; }
}

/* Resource tabs (Policies / Forms / Marketing) */
.vol-tabs { margin-top: 0.25rem; }
.vol-tabs__bar {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-bottom: 1.1rem; padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--border);
}
.vol-tab {
  border: 1px solid var(--border); background: #fff; color: var(--fnd-navy);
  border-radius: 999px; padding: 0.45rem 0.9rem;
  font-weight: 700; font-size: 0.9rem; font-family: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap;
}
.vol-tab:hover { border-color: var(--fnd-navy); }
.vol-tab.is-active { background: var(--fnd-navy); color: #fff; border-color: var(--fnd-navy); }
.vol-tab__count { background: rgba(0, 43, 95, 0.1); border-radius: 999px; padding: 0 0.45rem; font-size: 0.78rem; }
.vol-tab.is-active .vol-tab__count { background: rgba(255, 255, 255, 0.25); }
/* Progressive enhancement: without JS all panels show stacked (tab bar hidden) */
.vol-tab-panel { display: block; }
.vol-tab-panel + .vol-tab-panel { margin-top: 1.25rem; }
.vol-tabs:not(.is-tabbed) .vol-tabs__bar { display: none; }
.vol-tabs.is-tabbed .vol-tab-panel { display: none; }
.vol-tabs.is-tabbed .vol-tab-panel.is-active { display: block; }
.vol-tabs.is-tabbed .vol-tab-panel + .vol-tab-panel { margin-top: 0; }

/* Compact the shared page hero on portal / volunteer pages */
.page-hero .wrap { padding-top: clamp(1.3rem, 3.2vw, 2rem); padding-bottom: clamp(1.3rem, 3.2vw, 2rem); }
.page-hero h1 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }

/* ============================================================
   Public fundraiser pages (JustGiving-inspired)
   ============================================================ */
.fr-hero { background: linear-gradient(105deg, #f8fbff 0%, #ffffff 58%, #fff1f7 100%); border-bottom: 1px solid var(--border); }
.fr-hero .wrap { padding-top: clamp(1.3rem, 3vw, 2rem); padding-bottom: clamp(1.3rem, 3vw, 2rem); }
.fr-hero h1 { margin: 0.3rem 0; font-size: clamp(1.7rem, 4vw, 2.4rem); color: var(--fnd-navy); }
.fr-hero .fr-organiser { color: var(--muted); margin: 0; }

.fr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(1.5rem, 4vw, 2.5rem); align-items: start; }
.fr-cover { width: 100%; max-height: 440px; object-fit: cover; border-radius: 16px; margin-bottom: 1.25rem; }
.fr-story { font-size: 1.03rem; line-height: 1.75; color: var(--text); }
.fr-story p { margin: 0 0 1rem; }

.fr-aside { position: sticky; top: 1rem; }
.fr-donate { border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: 0 16px 44px rgba(0, 43, 95, 0.12); padding: 1.4rem; }
.fr-donate h2 { margin: 0 0 0.6rem; font-size: 1.05rem; color: var(--fnd-navy); }
.fr-raised { font-size: 2.3rem; font-weight: 900; color: var(--fnd-navy); line-height: 1; }
.fr-raised-meta { color: var(--muted); font-size: 0.92rem; margin: 0.35rem 0 0.7rem; }
.fr-bar { background: #eef2f7; border-radius: 999px; height: 12px; overflow: hidden; margin-bottom: 0.7rem; }
.fr-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--fnd-navy), var(--fnd-magenta)); border-radius: 999px; }
.fr-statline { display: flex; gap: 1.5rem; margin-bottom: 1.1rem; }
.fr-statline b { display: block; font-size: 1.15rem; color: var(--fnd-navy); line-height: 1.1; }
.fr-statline span { color: var(--muted); font-size: 0.78rem; }
.fr-amounts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.7rem; }
.fr-amount { flex: 1 1 60px; border: 1.5px solid var(--border); background: #fff; border-radius: 10px; padding: 0.6rem 0.3rem; font-weight: 800; color: var(--fnd-navy); cursor: pointer; font-family: inherit; font-size: 0.95rem; }
.fr-amount:hover, .fr-amount.is-active { border-color: var(--fnd-magenta); background: var(--pale); color: var(--fnd-magenta); }
.fr-money { position: relative; margin-bottom: 0.2rem; }
.fr-money::before { content: "£"; position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 800; }
.fr-money input { width: 100%; padding: 0.75rem 0.75rem 0.75rem 1.7rem; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 1.1rem; font-weight: 700; }
.fr-money input:focus { outline: none; border-color: var(--fnd-navy); box-shadow: 0 0 0 3px rgba(0, 43, 95, 0.12); }
.fr-donate .vol-form label { margin-bottom: 0.6rem; }
.fr-donate-btn { width: 100%; margin-top: 0.9rem; padding: 0.9rem; font-size: 1.05rem; }
.fr-secure { font-size: 0.78rem; color: var(--muted); margin-top: 0.6rem; text-align: center; }
.fr-supporters { margin-top: 1.6rem; }
.fr-supporters h2 { font-size: 1.1rem; color: var(--fnd-navy); }
.fr-supporter { padding: 0.7rem 0; border-top: 1px solid var(--border); font-size: 0.95rem; }
.fr-supporter strong { color: var(--fnd-navy); }
.fr-supporter span { color: var(--muted); }
@media (max-width: 900px) {
  .fr-layout { grid-template-columns: 1fr; }
  .fr-aside { position: static; order: -1; }
}

/* Fundraiser index grid */
.fr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.25rem; }
.fr-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 8px 24px rgba(0, 43, 95, 0.05); transition: transform 0.15s ease, box-shadow 0.15s ease; text-decoration: none; color: inherit; }
.fr-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0, 43, 95, 0.12); }
.fr-card__media { width: 100%; height: 170px; object-fit: cover; }
.fr-card__media--empty { background: linear-gradient(135deg, var(--fnd-navy), var(--fnd-magenta)); }
.fr-card__body { padding: 1.1rem; display: flex; flex-direction: column; flex: 1; }
.fr-card h3 { margin: 0 0 0.4rem; color: var(--fnd-navy); font-size: 1.1rem; }
.fr-card p { margin: 0 0 0.8rem; color: var(--muted); font-size: 0.92rem; }
.fr-card__foot { margin-top: auto; }
.fr-card__raised { font-weight: 800; color: var(--fnd-navy); font-size: 0.92rem; margin-bottom: 0.35rem; }
