/**
 * Pocket Giving — Fundraisers: Matching fundraiser demo UI design.
 *
 * Uses CSS custom properties for brand theming:
 *   --pg-brand          Primary brand color (default: #006B5E)
 *   --pg-border         Card / progress bar border colour
 *   --pg-progress-bg    Progress bar background
 *   --pg-progress-fill  Progress bar fill colour
 *   --pg-button-bg      Primary button background
 *   --pg-button-color   Primary button text colour
 */

/* =========================================================================
   HERO HEADER
   ========================================================================= */
.pg-hero {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--pg-brand, #006B5E), color-mix(in srgb, var(--pg-brand, #006B5E) 70%, #000));
    padding: 64px 24px;
}
.pg-hero::before,
.pg-hero::after {
    content: '';
    position: absolute;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}
.pg-hero::before { width: 420px; height: 420px; top: -180px; right: -80px; }
.pg-hero::after { width: 260px; height: 260px; bottom: -140px; left: -60px; background: rgba(232, 182, 80, 0.10); }
.pg-hero__inner { position: relative; max-width: 1200px; margin: 0 auto; }
.pg-hero__title {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0 0 12px 0;
}
.pg-hero__sub {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    margin: 0 0 28px 0;
    max-width: 600px;
    line-height: 1.6;
}
.pg-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.pg-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: 9999px;
    font-size: 0.875rem; font-weight: 600; text-decoration: none;
    cursor: pointer; transition: all 0.18s ease; border: none;
    white-space: nowrap; line-height: 1;
}
.pg-btn--gold {
    background: linear-gradient(135deg, #f0c468, #E8B650);
    color: #1a1a1a;
    box-shadow: 0 6px 18px rgba(232, 182, 80, 0.35);
}
.pg-btn--gold:hover { filter: brightness(1.03); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(232, 182, 80, 0.45); }
.pg-btn--outline-white {
    border: 1.5px solid rgba(255,255,255,0.6); color: #fff; background: rgba(255,255,255,0.08);
}
.pg-btn--outline-white:hover { background: #fff; color: var(--pg-brand, #006B5E); transform: translateY(-2px); }
.pg-btn--white {
    background: #fff; color: var(--pg-brand, #006B5E);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.pg-btn--white:hover { background: #f9fafb; transform: translateY(-2px); }
.pg-btn--primary {
    background: var(--pg-brand, #006B5E); color: #fff;
}
.pg-btn--primary:hover { filter: brightness(1.05); transform: translateY(-2px); }

/* =========================================================================
   CONTENT AREA
   ========================================================================= */
.pg-content-wrap { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
.pg-content__bar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.pg-content__count { font-size: 0.9rem; opacity: 0.6; margin: 0; }

/* =========================================================================
   CARDS GRID
   ========================================================================= */
.pg-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Card is a full link */
.pg-card-link {
    display: flex; flex-direction: column;
    border-radius: 18px; overflow: hidden;
    border: 1px solid var(--pg-border, #eef0f2);
    background: #fff;
    text-decoration: none; color: inherit;
    transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.25s ease;
}
.pg-card-link:hover {
    border-color: var(--pg-brand, #006B5E)33;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.10);
    transform: translateY(-4px);
}

/* Image */
.pg-card-img-wrap {
    position: relative; aspect-ratio: 16 / 10;
    background: #f3f4f6; overflow: hidden;
}
.pg-card-img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}
.pg-card-link:hover .pg-card-img { transform: scale(1.06); }
.pg-card-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}
.pg-card-badge {
    position: absolute; top: 12px; left: 12px;
    padding: 5px 12px; border-radius: 9999px;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.pg-card-days {
    position: absolute; top: 12px; right: 12px;
    padding: 5px 12px; border-radius: 9999px;
    font-size: 0.72rem; font-weight: 600;
    background: rgba(255,255,255,0.92); color: #374151;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(4px);
}

/* Body */
.pg-card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.pg-card-title {
    font-size: 1.05rem; font-weight: 700; line-height: 1.35;
    margin: 0 0 6px 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.pg-card-link:hover .pg-card-title { color: var(--pg-brand, #006B5E); }
.pg-card-tagline {
    font-size: 0.875rem; color: #6b7280; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin: 0 0 0 0;
}

/* Progress inside card */
.pg-card-progress-wrap { margin-top: auto; padding-top: 18px; }
.pg-card-progress-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.pg-card-raised { font-size: 1.15rem; font-weight: 800; color: var(--pg-brand, #006B5E); }
.pg-card-pct {
    font-size: 0.72rem; font-weight: 700;
    padding: 3px 10px; border-radius: 9999px;
    background: color-mix(in srgb, var(--pg-brand, #006B5E) 12%, transparent);
    color: var(--pg-brand, #006B5E);
}
.pg-card-progress-bar {
    height: 10px; background: var(--pg-progress-bg, #eef0f2);
    border-radius: 9999px; overflow: hidden;
}
.pg-card-progress-fill {
    height: 100%; border-radius: inherit;
    min-width: 4px;
    transition: width 0.6s ease;
}
.pg-card-progress-footer {
    display: flex; justify-content: space-between;
    font-size: 0.78rem; color: #6b7280; margin-top: 8px;
}

/* =========================================================================
   CTA BANNER
   ========================================================================= */
.pg-cta {
    position: relative; overflow: hidden;
    max-width: 1200px; margin: 48px auto; padding: 48px 32px;
    border-radius: 24px; text-align: center; color: #fff;
}
.pg-cta::before {
    content: '';
    position: absolute;
    width: 320px; height: 320px;
    border-radius: 9999px;
    top: -140px; right: -100px;
    background: rgba(255, 255, 255, 0.08);
}
.pg-cta__title { position: relative; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 8px 0; }
.pg-cta__text { position: relative; font-size: 1rem; opacity: 0.85; max-width: 450px; margin: 0 auto 24px; }
.pg-cta .pg-btn { position: relative; }

/* =========================================================================
   ERROR / EMPTY STATES
   ========================================================================= */
.pg-error,
.pg-empty {
    padding: 48px 24px; text-align: center;
    border: 1px solid var(--pg-border, #f3f4f6);
    border-radius: 16px; background: #fff;
}
.pg-error {
    border-color: #fecaca; background: #fef2f2; color: #991b1b;
}

/* =========================================================================
   THEME OVERRIDES
   Theme stylesheets load after ours — force our colors inside plugin areas.
   ========================================================================= */
.pg-hero .pg-hero__title,
.pg-hero h1.pg-hero__title { color: #fff !important; }
.pg-hero .pg-hero__sub,
.pg-hero p.pg-hero__sub { color: rgba(255, 255, 255, 0.82) !important; }
.pg-btn { text-decoration: none !important; }
.pg-btn--gold { color: #1a1a1a !important; }
.pg-btn--outline-white { color: #fff !important; }
.pg-btn--outline-white:hover { color: var(--pg-brand, #006B5E) !important; }
.pg-btn--white { color: var(--pg-brand, #006B5E) !important; }
.pg-btn--primary { color: #fff !important; }
.pg-card-link { color: inherit !important; }
.pg-cta { color: #fff !important; }
.pg-cta .pg-cta__title { color: #fff !important; }
.pg-cta .pg-cta__text { color: rgba(255, 255, 255, 0.85) !important; }

/* =========================================================================
   CHECKOUT PAGE
   ========================================================================= */
.pg-checkout {
    --pg-brand: var(--pg-brand, #006B5E);
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px 64px;
    font-family: inherit;
    color: #1f2937;
}
.pg-checkout__inner { display: flex; flex-direction: column; gap: 16px; }
.pg-checkout__title {
    font-size: clamp(1.5rem, 3.5vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0;
    text-align: center;
    color: #1f2937 !important;
}

/* Summary bar */
.pg-checkout-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px 20px;
}
.pg-checkout-summary__label { font-weight: 600; font-size: 0.95rem; }
.pg-checkout-summary__amount { display: inline-flex; align-items: center; gap: 4px; }
.pg-checkout-summary__currency { font-size: 1.2rem; font-weight: 700; color: var(--pg-brand); }
.pg-checkout-summary__input {
    width: 110px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    border-bottom: 2px solid #e5e7eb;
    padding: 4px 6px;
    text-align: right;
    background: transparent;
    color: #1f2937;
}
.pg-checkout-summary__input:focus { outline: none; border-color: var(--pg-brand); }
.pg-checkout-summary__appeal {
    flex-basis: 100%;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Cards */
.pg-checkout-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.pg-checkout-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #1f2937 !important;
}
.pg-checkout-sub {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 8px 0 0;
    color: #374151 !important;
}
.pg-checkout-row { display: flex; gap: 14px; flex-wrap: wrap; }
.pg-checkout-row .pg-checkout-field { flex: 1; min-width: 180px; }
.pg-checkout-field { display: flex; flex-direction: column; gap: 6px; }
.pg-checkout-label { font-size: 0.82rem; font-weight: 600; color: #374151; }
.pg-checkout-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.95rem;
    background: #fff;
    color: #1f2937;
    box-sizing: border-box;
}
.pg-checkout-input:focus { outline: none; border-color: var(--pg-brand); box-shadow: 0 0 0 3px rgba(0, 107, 94, 0.12); }
.pg-checkout-hint { font-size: 0.85rem; color: #6b7280; margin: 0; line-height: 1.5; }

/* Gift Aid */
.pg-checkout-giftaid { border-left: 4px solid #E8B650; background: #fffdf5; }
.pg-checkout-giftaid__head { font-size: 1.05rem; color: #8a5b0e; }
.pg-checkout-giftaid__text { font-size: 0.9rem; color: #4b5563; margin: 0; line-height: 1.5; }

/* Checks */
.pg-checkout-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.92rem;
    color: #1f2937;
    cursor: pointer;
}
.pg-checkout-check input { margin-top: 3px; accent-color: var(--pg-brand); width: 16px; height: 16px; }
.pg-checkout-check small { display: block; font-size: 0.78rem; color: #6b7280; margin-top: 2px; line-height: 1.45; }
.pg-checkout-check--inline { flex-direction: row; align-items: center; gap: 8px; }
.pg-checkout-prefs { display: flex; gap: 18px; flex-wrap: wrap; }

/* Payment */
.pg-checkout-payment { align-items: stretch; }
.pg-checkout-card-element {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 12px 14px;
    background: #fff;
}
.pg-checkout-card-element:focus-within { border-color: var(--pg-brand); box-shadow: 0 0 0 3px rgba(0, 107, 94, 0.12); }
.pg-checkout-error {
    color: #b91c1c;
    font-size: 0.88rem;
    margin: 0;
    display: none;
}
.pg-checkout-submit {
    justify-content: center;
    width: 100%;
    font-size: 1rem;
    padding: 14px 24px;
}
.pg-checkout-submit:disabled { opacity: 0.6; }
.pg-checkout-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #9ca3af;
    font-size: 0.8rem;
    margin: 14px 0;
}
.pg-checkout-divider::before,
.pg-checkout-divider::after { content: ''; flex: 1; height: 1px; background: #e5e7eb; }
.pg-checkout-secure { text-align: center; font-size: 0.8rem; color: #6b7280; margin: 4px 0 0; }
#pg-gpay-button { width: 100%; }

/* Success */
.pg-checkout-success {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 40px 24px;
    text-align: center;
}
.pg-checkout-success__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 9999px;
    background: #dcfce7;
    color: #16a34a;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pg-checkout-footer { text-align: center; font-size: 0.8rem; color: #9ca3af; margin: 8px 0 0; }

/* Step status */
.pg-checkout-step { text-align: center; font-size: 0.85rem; color: #6b7280; margin: -6px 0 0; }

/* Summary (platform style) */
.pg-checkout-summary { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; overflow: hidden; }
.pg-checkout-summary__head {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 16px 20px; background: none; border: none;
    font-size: 0.95rem; font-weight: 700; color: #1f2937; cursor: pointer;
    text-align: left;
}
.pg-checkout-summary__info { color: #9ca3af; margin-left: 4px; }
.pg-checkout-summary__count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
    border-radius: 9999px; background: #f3f4f6; color: #4b5563;
    font-size: 0.72rem; font-weight: 700;
}
.pg-checkout-summary__total { font-weight: 700; color: var(--pg-brand, #006B5E); }
.pg-checkout-summary__body { padding: 0 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.pg-checkout-summary__row {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.88rem; color: #4b5563;
}
.pg-checkout-summary__row--total { font-weight: 700; color: #1f2937; border-top: 1px solid #f3f4f6; padding-top: 10px; }
.pg-checkout-summary__amount-edit { display: flex; flex-direction: column; gap: 6px; }
.pg-checkout-req { color: #dc2626; }

/* Sign-up link */
.pg-checkout-link {
    background: none; border: none; padding: 0;
    color: var(--pg-brand, #006B5E); font-weight: 600;
    text-decoration: underline; cursor: pointer; font-size: inherit;
}
.pg-checkout-link:hover { text-decoration: none; }

/* Toggle switches (communication prefs) */
.pg-checkout-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9rem; color: #1f2937; }
.pg-checkout-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.pg-checkout-switch__track {
    width: 40px; height: 22px; border-radius: 9999px;
    background: #d1d5db; position: relative; transition: background 0.2s;
}
.pg-checkout-switch__track::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 18px; height: 18px; border-radius: 9999px; background: #fff;
    transition: transform 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.pg-checkout-switch input:checked + .pg-checkout-switch__track { background: var(--pg-brand, #006B5E); }
.pg-checkout-switch input:checked + .pg-checkout-switch__track::after { transform: translateX(18px); }

/* Payment actions */
.pg-checkout-actions { display: flex; flex-direction: column; gap: 6px; }
.pg-checkout-paypal {
    justify-content: center; width: 100%; font-size: 1rem;
    background: #ffc439; color: #111 !important; font-weight: 700;
}
.pg-checkout-paypal:hover { filter: brightness(0.96); transform: translateY(-1px); }
.pg-checkout-gocardless {
    justify-content: center; width: 100%; font-size: 1rem;
    background: #f3f4f6; color: #1f2937 !important; font-weight: 700;
    border: 1px solid #d1d5db;
}
.pg-checkout-gocardless:hover { background: #e5e7eb; transform: translateY(-1px); }
#pg-gpay-button { width: 100%; }

/* Legal footer */
.pg-checkout-legal {
    display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
    font-size: 0.8rem; color: #6b7280;
}
.pg-checkout-legal a { color: var(--pg-brand, #006B5E); text-decoration: none; }
.pg-checkout-legal a:hover { text-decoration: underline; }

/* Support us panel + percentage slider (platform style) */
.pg-checkout-support {
    background: color-mix(in srgb, var(--pg-brand, #006B5E) 6%, #fff);
    border: 1px solid color-mix(in srgb, var(--pg-brand, #006B5E) 12%, #e5e7eb);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pg-checkout-slider { position: relative; padding-top: 38px; }
.pg-checkout-slider__tooltip {
    position: absolute;
    top: 0;
    z-index: 5;
    transform: translateX(-50%);
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    color: #1f2937;
}
.pg-checkout-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 9999px;
    outline: none;
}
.pg-checkout-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    background: var(--pg-brand, #006B5E);
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}
.pg-checkout-slider input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 9999px;
    background: var(--pg-brand, #006B5E);
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

/* Section completion check circles */
.pg-checkout-check-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-left: 8px;
    border-radius: 9999px;
    border: 2px solid #d1d5db;
    background: #f9fafb;
    color: transparent;
    font-size: 0.8rem;
    font-weight: 700;
    vertical-align: middle;
}
.pg-checkout-check-circle--done {
    background: var(--pg-brand, #006B5E);
    border-color: var(--pg-brand, #006B5E);
    color: #fff;
}

/* =========================================================================
   FOCUS-VISIBLE
   ========================================================================= */
.pg-card-link:focus-visible,
.pg-btn:focus-visible,
.pg-detail a:focus-visible,
.pg-detail button:focus-visible,
.pg-donate-btn:focus-visible,
.pg-giving__btn:focus-visible,
.pg-checkout__btn:focus-visible,
.pg-checkout__donate:focus-visible,
.pg-start-btn:focus-visible,
.pg-start-input:focus-visible,
.pg-start-textarea:focus-visible {
    outline: 2px solid var(--pg-brand, #006B5E);
    outline-offset: 2px;
}

/* =========================================================================
   SCREEN-READER ONLY
   ========================================================================= */
.pg-sr-only {
    border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
    height: 1px; margin: -1px; overflow: hidden; padding: 0;
    position: absolute; width: 1px; word-wrap: normal !important;
}

/* =========================================================================
   SKELETON LOADING
   ========================================================================= */
.pg-skeleton {
    background: var(--pg-progress-bg, #f3f4f6);
    animation: pg-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}
@keyframes pg-shimmer {
    0%   { opacity: 0.6; }
    50%  { opacity: 1; }
    100% { opacity: 0.6; }
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 640px) {
    .pg-fundraisers.pg-layout--grid {
        grid-template-columns: 1fr;
    }

    .pg-layout--list .pg-card {
        flex-direction: column;
    }

    .pg-layout--list .pg-card__image-link {
        flex: none;
        aspect-ratio: 16 / 10;
        min-height: auto;
    }
}

/* -------------------------------------------------------------------------
   Theme variables — partners can override these in their theme CSS:
   -------------------------------------------------------------------------
   --pg-border          Card / progress bar border colour
   --pg-progress-bg     Progress bar background
   --pg-progress-fill   Progress bar fill colour
   --pg-button-bg       Donate button background
   --pg-button-color    Donate button text colour
   ------------------------------------------------------------------------- */

/* =========================================================================
   DETAIL PAGE — Full fundraiser view
   ========================================================================= */
.pg-detail {
    max-width: 1100px; margin: 0 auto;
    padding: 24px;
}

.pg-detail__back {
    display: inline-block; margin-bottom: 20px; text-decoration: none;
    font-size: 0.9em; opacity: 0.6;
}
.pg-detail__back:hover { opacity: 1; }

/* Hero + Header + Progress Card — side by side on desktop */
.pg-detail__hero-wrap {
    display: flex; gap: 32px; flex-wrap: wrap;
    margin-bottom: 32px;
}
.pg-detail__hero {
    flex: 1 1 380px; min-width: 280px; border-radius: 16px; overflow: hidden;
}
.pg-detail__hero-img { width: 100%; display: block; aspect-ratio: 4/3; object-fit: cover; }
.pg-detail__header { flex: 1 1 400px; min-width: 280px; }

/* Badge pills */
.pg-detail__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pg-detail__badge {
    display: inline-block; padding: 4px 12px; border-radius: 9999px;
    font-size: 0.75rem; font-weight: 500;
}
.pg-detail__badge--muted { background: #f3f4f6; color: #6b7280; }

.pg-detail__title {
    font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700;
    margin: 0 0 8px 0; line-height: 1.2;
}
.pg-detail__tagline { font-size: 1.1rem; color: #6b7280; margin: 0 0 16px 0; }
.pg-detail__charity { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; margin-bottom: 20px; }
.pg-detail__charity-logo { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }

/* Progress Card */
.pg-detail__progress-card {
    border: 1px solid #e5e7eb; border-radius: 16px; padding: 24px;
    background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    margin-top: 20px;
}
.pg-detail__progress-header {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 8px;
}
.pg-detail__progress-raised { font-size: 1.5rem; font-weight: 700; }
.pg-detail__progress-target-label { font-size: 0.875rem; color: #9ca3af; }
.pg-detail__progress-bar {
    height: 12px; background: #f3f4f6; border-radius: 6px;
    overflow: hidden; margin-bottom: 10px;
}
.pg-detail__progress-fill { height: 100%; border-radius: inherit; transition: width 0.5s ease; }
.pg-detail__progress-footer {
    display: flex; gap: 16px; flex-wrap: wrap;
    font-size: 0.85rem; color: #9ca3af;
}

/* Giving levels */
.pg-detail__giving {
    margin-bottom: 28px;
    padding: 24px;
    border: 1px solid var(--pg-border, #e5e7eb);
    border-radius: 8px;
    background: var(--pg-giving-bg, #f9fafb);
}
.pg-detail__giving h2 {
    margin: 0 0 16px 0;
    font-size: 1.2em;
}
.pg-giving__options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.pg-giving__btn {
    flex: 1;
    min-width: 80px;
    padding: 12px 16px;
    border: 2px solid var(--pg-border, #e5e7eb);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 700;
    text-align: center;
    transition: all 0.15s;
    color: inherit;
}
.pg-giving__btn:hover {
    border-color: var(--pg-progress-fill, #059669);
}
.pg-giving__btn--active {
    border-color: var(--pg-progress-fill, #059669);
    background: var(--pg-progress-fill, #059669);
    color: #fff;
}
.pg-giving__btn small {
    display: block;
    font-weight: 400;
    font-size: 0.75em;
    opacity: 0.7;
    margin-top: 2px;
}
.pg-giving__custom {
    position: relative;
    margin-bottom: 16px;
}
.pg-giving__input {
    width: 100%;
    padding: 14px 16px 14px 36px;
    border: 2px solid var(--pg-border, #e5e7eb);
    border-radius: 8px;
    font-size: 1.05em;
    box-sizing: border-box;
}
.pg-giving__currency {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    opacity: 0.5;
}
.pg-donate-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--pg-button-bg, #1a1a2e);
    color: var(--pg-button-color, #fff);
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}
.pg-donate-btn:hover { opacity: 0.9; }
.pg-donate-note {
    text-align: center;
    font-size: 0.8em;
    opacity: 0.5;
    margin: 10px 0 0 0;
}

/* Story */
.pg-detail__story { margin-bottom: 28px; }
.pg-detail__story h2 { margin-bottom: 12px; }

/* Gallery */
.pg-detail__gallery { margin-bottom: 28px; }
.pg-detail__gallery h2 { margin-bottom: 12px; }
.pg-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.pg-gallery__item {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 6px;
}
.pg-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}
.pg-gallery__item:hover img { transform: scale(1.05); }

/* Updates */
.pg-detail__updates { margin-bottom: 28px; }
.pg-detail__updates h2 { margin-bottom: 12px; }
.pg-updates { display: flex; flex-direction: column; gap: 20px; }
.pg-update {
    display: flex;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--pg-border, #e5e7eb);
    border-radius: 8px;
}
.pg-update__img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.pg-update__body { flex: 1; }
.pg-update__body h3 { margin: 0 0 4px 0; font-size: 1.05em; }
.pg-update__date { font-size: 0.8em; opacity: 0.5; display: block; margin-bottom: 8px; }
.pg-update__text { font-size: 0.95em; line-height: 1.6; }

@media (max-width: 640px) {
    .pg-update { flex-direction: column; }
    .pg-update__img { width: 100%; height: 180px; }
    .pg-detail__title { font-size: 1.5em; }
}

/* =========================================================================
   LEADERBOARD
   ========================================================================= */
.pg-leaderboard {
    max-width: 900px;
    margin: 0 auto;
}

/* Podium */
.pg-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 0 8px;
}
.pg-podium__item {
    flex: 1;
    min-width: 0;
    max-width: 200px;
    text-align: center;
}
.pg-podium__medal {
    font-size: 2rem;
    margin-bottom: 4px;
}
.pg-podium__name {
    font-size: 0.85em;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
}
.pg-podium__amount {
    font-size: 1em;
    font-weight: 800;
    color: var(--pg-progress-fill, #059669);
    margin: 2px 0;
}
.pg-podium__bar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.2em;
    border-radius: 8px 8px 0 0;
}
.pg-podium__bar--gold {
    height: 100px;
    background: linear-gradient(to top, #b7860b, #e8b650);
}
.pg-podium__bar--silver {
    height: 70px;
    background: #9ca3af;
}
.pg-podium__bar--bronze {
    height: 50px;
    background: #d97706;
}

/* Leaderboard list */
.pg-leaderboard-list {
    border: 1px solid var(--pg-border, #e5e7eb);
    border-radius: 12px;
    overflow: hidden;
}
.pg-leaderboard-list__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--pg-giving-bg, #f9fafb);
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 1px solid var(--pg-border, #e5e7eb);
}
.pg-leaderboard-list__count {
    opacity: 0.5;
    font-weight: 400;
}
.pg-leaderboard-list__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--pg-border, #e5e7eb);
}
.pg-leaderboard-list__item:last-child { border-bottom: none; }
.pg-leaderboard-list__rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--pg-progress-bg, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 700;
    flex-shrink: 0;
}
.pg-leaderboard-list__info {
    flex: 1;
    min-width: 0;
}
.pg-leaderboard-list__name {
    font-weight: 600;
    text-decoration: none;
    color: inherit;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pg-leaderboard-list__name:hover { text-decoration: underline; }
.pg-leaderboard-list__progress { margin-top: 4px; }
.pg-leaderboard-list__amount {
    font-weight: 700;
    font-size: 0.95em;
    flex-shrink: 0;
}

/* =========================================================================
   START FUNDRAISING — Creation Wizard
   ========================================================================= */
.pg-start-fundraising {
    max-width: 680px;
    margin: 0 auto;
}

/* Step indicator */
.pg-start-steps {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 28px;
}
.pg-start-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 9999px;
    background: var(--pg-progress-bg, #e5e7eb);
    opacity: 0.5;
    font-size: 0.85em;
    font-weight: 500;
}
.pg-start-step--active {
    opacity: 1;
    background: var(--pg-progress-fill, #059669);
    color: #fff;
}
.pg-start-step__num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: 700;
}

/* Panels */
.pg-start-panel { display: none; }
.pg-start-panel--active { display: block; }
.pg-start-panel__title {
    font-size: 1.35em;
    font-weight: 700;
    margin: 0 0 4px 0;
}
.pg-start-panel__desc {
    opacity: 0.65;
    margin-bottom: 20px;
    font-size: 0.95em;
}

/* Form fields */
.pg-start-field {
    margin-bottom: 16px;
}
.pg-start-row {
    display: flex;
    gap: 16px;
}
.pg-start-row .pg-start-field { flex: 1; }
.pg-start-label {
    display: block;
    font-size: 0.875em;
    font-weight: 600;
    margin-bottom: 4px;
}
.pg-start-required { color: #ef4444; }
.pg-start-input,
.pg-start-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--pg-border, #e5e7eb);
    border-radius: 10px;
    font-size: 0.95em;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.15s;
}
.pg-start-input:focus,
.pg-start-textarea:focus {
    outline: none;
    border-color: var(--pg-progress-fill, #059669);
    box-shadow: 0 0 0 3px rgba(5,150,105,0.1);
}
.pg-start-textarea { min-height: 100px; resize: vertical; }
.pg-start-hint { font-size: 0.8em; opacity: 0.5; margin-top: 4px; }
.pg-start-error-text {
    color: #dc2626; font-size: 0.85em; font-weight: 500; margin-top: 6px;
}

/* Image upload */
.pg-start-upload {
    border: 2px dashed var(--pg-border, #e5e7eb);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: border-color 0.15s, background 0.15s;
    background: var(--pg-giving-bg, #f9fafb);
}
.pg-start-upload:hover { border-color: var(--pg-brand, #006B5E); }
.pg-start-upload__input {
    position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%);
}
.pg-start-upload__prompt {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: #6b7280; font-size: 0.9em;
}
.pg-start-upload__prompt svg { opacity: 0.5; }
.pg-start-upload__preview {
    position: relative; display: inline-block; max-width: 100%;
}
.pg-start-upload__preview img {
    max-width: 100%; max-height: 220px; border-radius: 8px; display: block; margin: 0 auto;
}
.pg-start-upload__remove {
    position: absolute; top: -8px; right: -8px;
    width: 26px; height: 26px; border-radius: 50%;
    background: #1f2937; color: #fff; border: 2px solid #fff;
    font-size: 1rem; line-height: 1; cursor: pointer;
}
.pg-start-upload__remove:hover { background: #dc2626; }

/* Preview card image */
.pg-start-preview__img-wrap {
    width: 100%; aspect-ratio: 16 / 10; overflow: hidden;
    border-radius: 8px; margin-bottom: 12px;
}
.pg-start-preview__img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Preview card */
.pg-start-preview { margin-bottom: 16px; }
.pg-start-preview__card {
    border: 1px solid var(--pg-border, #e5e7eb);
    border-radius: 12px;
    padding: 24px;
}
.pg-start-preview__name {
    font-size: 1.2em;
    font-weight: 700;
    margin: 0 0 4px 0;
}
.pg-start-preview__tagline { opacity: 0.65; margin: 0 0 12px 0; }
.pg-start-preview__meta {
    display: flex;
    gap: 16px;
    font-size: 0.85em;
    opacity: 0.6;
    margin-bottom: 8px;
}
.pg-start-preview__story {
    font-size: 0.9em;
    line-height: 1.5;
    opacity: 0.75;
}

/* Messages */
.pg-start-message {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 16px;
}
.pg-start-message--success {
    background: #ecfdf5;
    border: 1px solid #059669;
    color: #065f46;
}
.pg-start-message--error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
}
.pg-start-message strong { display: block; margin-bottom: 4px; }
.pg-start-message p { margin: 0; font-size: 0.9em; }

/* Navigation buttons */
.pg-start-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}
.pg-start-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 9999px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
}
.pg-start-btn--primary {
    background: var(--pg-button-bg, #1a1a2e);
    color: var(--pg-button-color, #fff);
}
.pg-start-btn--primary:hover { opacity: 0.85; }
.pg-start-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }
.pg-start-btn--outline {
    background: transparent;
    border: 2px solid var(--pg-border, #e5e7eb);
    color: inherit;
}
.pg-start-btn--outline:hover { border-color: var(--pg-progress-fill, #059669); }
.pg-start-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--pg-border, #e5e7eb);
    border-top-color: var(--pg-progress-fill, #059669);
    border-radius: 50%;
    animation: pg-shimmer 0.8s linear infinite;
}

/* =========================================================================
   CHECKOUT
   ========================================================================= */
.pg-checkout {
    max-width: 480px;
    margin: 0 auto;
    padding: 28px;
    border: 1px solid var(--pg-border, #e5e7eb);
    border-radius: 12px;
    background: var(--pg-giving-bg, #f9fafb);
}
.pg-checkout__title {
    margin: 0 0 4px 0;
    font-size: 1.25em;
}
.pg-checkout__charity {
    opacity: 0.6;
    font-size: 0.9em;
    margin-bottom: 16px;
}
.pg-checkout__amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.pg-checkout__btn {
    flex: 1;
    min-width: 70px;
    padding: 10px 14px;
    border: 2px solid var(--pg-border, #e5e7eb);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95em;
    transition: all 0.15s;
    color: inherit;
}
.pg-checkout__btn:hover { border-color: var(--pg-progress-fill, #059669); }
.pg-checkout__btn--active {
    border-color: var(--pg-progress-fill, #059669);
    background: var(--pg-progress-fill, #059669);
    color: #fff;
}
.pg-checkout__custom {
    position: relative;
    margin-bottom: 14px;
}
.pg-checkout__input {
    width: 100%;
    padding: 12px 14px 12px 32px;
    border: 2px solid var(--pg-border, #e5e7eb);
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
}
.pg-checkout__symbol {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    opacity: 0.4;
}
.pg-checkout__donate {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--pg-button-bg, #1a1a2e);
    color: var(--pg-button-color, #fff);
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}
.pg-checkout__donate:hover { opacity: 0.9; }
.pg-checkout__note {
    text-align: center;
    font-size: 0.8em;
    opacity: 0.5;
    margin: 10px 0 0 0;
}

@media (max-width: 640px) {
    .pg-start-row { flex-direction: column; gap: 0; }
    .pg-podium__bar--gold { height: 70px; }
    .pg-podium__bar--silver { height: 50px; }
    .pg-podium__bar--bronze { height: 36px; }
    .pg-podium__medal { font-size: 1.5rem; }
    .pg-podium__amount { font-size: 0.8em; }
}
