
/* ═══════════════════════════════════════════
   FUNDR — Campaign Form Styles
   ═══════════════════════════════════════════ */

:root {
    --fundr-primary: #4f46e5;
    --fundr-primary-hover: #4338ca;
    --fundr-success: #16a34a;
    --fundr-success-bg: #f0fdf4;
    --fundr-danger: #dc2626;
    --fundr-danger-bg: #fef2f2;
    --fundr-warning: #d97706;
    --fundr-warning-bg: #fffbeb;
    --fundr-muted: #6b7280;
    --fundr-border: #e5e7eb;
    --fundr-bg: #f9fafb;
    --fundr-card-bg: #ffffff;
    --fundr-radius: 12px;
    --fundr-radius-sm: 8px;
    --fundr-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --fundr-shadow-lg: 0 10px 25px rgba(0,0,0,.08);
    --fundr-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --fundr-transition: .2s ease;
}

/* ── Reset ── */
.fundr-form-wrapper *,
.fundr-dashboard *,
.fundr-public-listing * {
    box-sizing: border-box;
    font-family: var(--fundr-font);
}
/* ── Wrapper ── */
.fundr-form-wrapper {
    max-width: 720px;
    margin: 40px auto;
    padding: 0 16px;
}

/* ── Progress Bar ── */
.fundr-progress { margin-bottom: 32px; }
.fundr-progress__bar {
    height: 6px;
    background: var(--fundr-border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 16px;
}
.fundr-progress__fill {
    height: 100%;
    background: var(--fundr-primary);
    border-radius: 3px;
    transition: width .4s ease;
}
.fundr-progress__steps {
    display: flex;
    justify-content: space-between;
    gap: 4px;
}
.fundr-progress__step {
    background: none;
    border: none;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--fundr-muted);
    cursor: pointer;
    border-radius: var(--fundr-radius-sm);
    transition: var(--fundr-transition);
    display: flex;
    align-items: center;
    gap: 6px;
}
.fundr-progress__step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px !important;
    height: 15px !important;
    border-radius: 50%;
    background: var(--fundr-border);
    font-weight: 600;
    font-size: 10px;
    color: var(--fundr-muted);
    transition: var(--fundr-transition);
}
.fundr-progress__step.active span,
.fundr-progress__step.completed span {
    background: var(--fundr-primary);
    color: #fff;
}
.fundr-progress__step.active { color: var(--fundr-primary); font-weight: 600; }
.fundr-progress__step.completed { color: var(--fundr-success); }
.fundr-progress__step.completed span { background: var(--fundr-success); }

/* ── Steps ── */
.fundr-step { display: none; animation: fundrFadeIn .35s ease; }
.fundr-step.active { display: block; }
@keyframes fundrFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.fundr-step__header { margin-bottom: 28px; }
.fundr-step__header h2 { font-size: 24px; font-weight: 700; margin: 0 0 6px; color: #111827; }
.fundr-step__desc { margin: 0; color: var(--fundr-muted); font-size: 15px; }

/* ── Fields ── */
.fundr-field { margin-bottom: 22px; position: relative; }
.fundr-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.fundr-field label .req { color: var(--fundr-danger); }

.fundr-field input[type="text"],
.fundr-field input[type="url"],
.fundr-field input[type="date"],
.fundr-field input[type="number"],
.fundr-field select,
.fundr-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--fundr-border);
    border-radius: var(--fundr-radius-sm);
    font-size: 15px;
    color: #111827;
    background: #fff;
    transition: var(--fundr-transition);
    outline: none;
}
.fundr-field input:focus,
.fundr-field select:focus,
.fundr-field textarea:focus {
    border-color: var(--fundr-primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.fundr-field input.has-error,
.fundr-field select.has-error,
.fundr-field textarea.has-error {
    border-color: var(--fundr-danger);
    box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}
.fundr-field__error {
    display: block;
    font-size: 13px;
    color: var(--fundr-danger);
    margin-top: 4px;
    min-height: 0;
}
.fundr-field__help {
    display: block;
    font-size: 12px;
    color: var(--fundr-muted);
    margin-top: 4px;
}
.fundr-field__count {
    display: block;
    font-size: 12px;
    color: var(--fundr-muted);
    text-align: right;
    margin-top: 2px;
}

/* ── Row (Half Width) ── */
.fundr-row { display: flex; gap: 16px; }
.fundr-field--half { flex: 1; }
@media (max-width: 600px) {
    .fundr-row { flex-direction: column; gap: 0; }
}

/* ── Buttons ── */
.fundr-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--fundr-radius-sm);
    cursor: pointer;
    transition: var(--fundr-transition);
    line-height: 1;
}
.fundr-btn--primary {
    background: var(--fundr-primary);
    color: #fff;
}
.fundr-btn--primary:hover { background: var(--fundr-primary-hover); }
.fundr-btn--success {
    background: var(--fundr-success);
    color: #fff;
}
.fundr-btn--success:hover { background: #15803d; }
.fundr-btn--success:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.fundr-btn--outline {
    background: #fff;
    border-color: var(--fundr-border);
    color: #374151;
}
.fundr-btn--outline:hover { border-color: var(--fundr-primary); color: var(--fundr-primary); }
.fundr-btn--block { width: 100%; justify-content: center; }

.fundr-step__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--fundr-border);
}

/* ── Upload Area ── */
.fundr-upload {
    position: relative;
    border: 2px dashed var(--fundr-border);
    border-radius: var(--fundr-radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--fundr-transition);
    background: var(--fundr-bg);
    overflow: hidden;
}
.fundr-upload:hover { border-color: var(--fundr-primary); background: #f5f3ff; }
.fundr-upload__icon { font-size: 40px; display: block; margin-bottom: 8px; }
.fundr-upload__placeholder p { margin: 0 0 4px; color: #374151; font-weight: 500; }
.fundr-upload__placeholder small { color: var(--fundr-muted); }
.fundr-upload__preview {
    max-width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--fundr-radius-sm);
}
.fundr-upload__remove {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Budget ── */
.fundr-budget-summary {
    background: var(--fundr-bg);
    border-radius: var(--fundr-radius);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--fundr-border);
}
.fundr-budget-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}
.fundr-budget-summary__row--diff strong { color: var(--fundr-primary); }
.fundr-budget-summary__row--diff strong.matched { color: var(--fundr-success); }
.fundr-budget-summary__row--diff strong.over { color: var(--fundr-danger); }

.fundr-budget-item {
    background: var(--fundr-card-bg);
    border: 1px solid var(--fundr-border);
    border-radius: var(--fundr-radius);
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    animation: fundrFadeIn .3s ease;
}
.fundr-budget-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.fundr-budget-item__header strong { font-size: 14px; color: var(--fundr-muted); }
.fundr-budget-item__remove {
    background: none;
    border: none;
    color: var(--fundr-danger);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--fundr-transition);
}
.fundr-budget-item__remove:hover { background: var(--fundr-danger-bg); }
.fundr-budget-item .fundr-row { margin-bottom: 0; }
.fundr-budget-item .fundr-field { margin-bottom: 12px; }

/* ── Checkbox ── */
.fundr-field--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    cursor: pointer;
}
.fundr-field--checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--fundr-primary);
    flex-shrink: 0;
}

/* ── Review Panel ── */
.fundr-review {
    background: var(--fundr-bg);
    border-radius: var(--fundr-radius);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--fundr-border);
}
.fundr-review__section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--fundr-border);
}
.fundr-review__section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.fundr-review__section h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--fundr-muted);
    margin: 0 0 10px;
}
.fundr-review__row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
}
.fundr-review__row span:first-child { color: var(--fundr-muted); }
.fundr-review__row span:last-child { font-weight: 600; color: #111827; }

/* ── Notices ── */
.fundr-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--fundr-radius);
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
}
.fundr-notice__icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.fundr-notice p { margin: 4px 0 0; }
.fundr-notice strong { display: block; margin-bottom: 2px; }
.fundr-notice--success { background: var(--fundr-success-bg); border: 1px solid #bbf7d0; color: #166534; }
.fundr-notice--danger  { background: var(--fundr-danger-bg);  border: 1px solid #fecaca; color: #991b1b; }
.fundr-notice--warning { background: var(--fundr-warning-bg); border: 1px solid #fde68a; color: #92400e; }

/* ── Badges ── */
.fundr-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.fundr-badge--success { background: #dcfce7; color: #166534; }
.fundr-badge--warning { background: #fef3c7; color: #92400e; }
.fundr-badge--danger  { background: #fee2e2; color: #991b1b; }
.fundr-badge--muted   { background: #f3f4f6; color: #6b7280; }
.fundr-badge--optional { background: #f3f4f6; color: #6b7280; font-weight: 500; font-size: 11px; }

/* ── Spinner ── */
.fundr-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fundrSpin .6s linear infinite;
}
@keyframes fundrSpin { to { transform: rotate(360deg); } }

/* ── Dashboard ── */
.fundr-dashboard { max-width: 900px; margin: 40px auto; padding: 0 16px; }
.fundr-dashboard__header { margin-bottom: 28px; }
.fundr-dashboard__header h2 { font-size: 26px; font-weight: 700; margin: 0; color: #111827; }

.fundr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.fundr-card {
    background: var(--fundr-card-bg);
    border-radius: var(--fundr-radius);
    border: 1px solid var(--fundr-border);
    overflow: hidden;
    box-shadow: var(--fundr-shadow);
    transition: var(--fundr-transition);
}
.fundr-card:hover { box-shadow: var(--fundr-shadow-lg); transform: translateY(-2px); }
.fundr-card__thumb { height: 180px; overflow: hidden; background: var(--fundr-bg); display: flex; align-items: center; justify-content: center; }
.fundr-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.fundr-card__thumb-placeholder { font-size: 48px; }
.fundr-card__body { padding: 20px; }
.fundr-card__title { font-size: 17px; font-weight: 600; margin: 10px 0 12px; color: #111827; }
.fundr-card__meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--fundr-muted); }

/* ── Empty State ── */
.fundr-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--fundr-muted);
}
.fundr-empty__icon { font-size: 48px; display: block; margin-bottom: 12px; }
.fundr-empty h3 { font-size: 18px; color: #374151; margin: 0 0 8px; }
.fundr-empty p { margin: 0; }

/* ═══════════════════════════════════════════
   PUBLIC CAMPAIGN LISTING
   ═══════════════════════════════════════════ */
.fundr-public-listing {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 16px;
}

.fundr-public-listing .fundr-grid {
    display: grid !important;
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.fundr-public-listing .fundr-grid--1 { grid-template-columns: 1fr; }
.fundr-public-listing .fundr-grid--2 { grid-template-columns: repeat(2, 1fr); }
.fundr-public-listing .fundr-grid--3 { grid-template-columns: repeat(3, 1fr); }
.fundr-public-listing .fundr-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .fundr-public-listing .fundr-grid--3,
    .fundr-public-listing .fundr-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .fundr-public-listing .fundr-grid--2,
    .fundr-public-listing .fundr-grid--3,
    .fundr-public-listing .fundr-grid--4 { grid-template-columns: 1fr; }
}

.fundr-public-listing a.fundr-listing-card,
.fundr-public-listing a.fundr-listing-card:visited,
.fundr-public-listing a.fundr-listing-card:hover,
.fundr-public-listing a.fundr-listing-card:focus {
    display: block;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    transition: all .2s ease;
    text-decoration: none !important;
    color: inherit !important;
}
.fundr-public-listing a.fundr-listing-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,.08) !important;
    transform: translateY(-3px);
}
.fundr-public-listing .fundr-listing-card--expired {
    opacity: .7;
}

.fundr-public-listing .fundr-listing-card__thumb {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fundr-public-listing .fundr-listing-card__thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transition: transform .3s ease;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    max-width: none !important;
}
.fundr-public-listing a.fundr-listing-card:hover .fundr-listing-card__thumb img {
    transform: scale(1.05);
}

.fundr-public-listing .fundr-listing-card__cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,.6);
    color: #fff !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    backdrop-filter: blur(4px);
    line-height: 1.4;
}
.fundr-public-listing .fundr-listing-card__expired-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #dc2626;
    color: #fff !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.4;
}

.fundr-public-listing .fundr-listing-card__body {
    padding: 20px;
}
.fundr-public-listing .fundr-listing-card__title,
.fundr-public-listing a.fundr-listing-card .fundr-listing-card__title {
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    color: #111827 !important;
    line-height: 1.3 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none !important;
    border: none !important;
}
.fundr-public-listing .fundr-listing-card__excerpt {
    font-size: 13px !important;
    color: #6b7280 !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fundr-public-listing .fundr-listing-card__footer {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    margin: 0;
}
.fundr-public-listing .fundr-listing-card__goal,
.fundr-public-listing .fundr-listing-card__time {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fundr-public-listing .fundr-listing-card__label {
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280 !important;
    font-weight: 500;
    margin: 0 !important;
}
.fundr-public-listing .fundr-listing-card__goal strong {
    color: #4f46e5 !important;
    font-size: 15px !important;
}
.fundr-public-listing .fundr-listing-card__time strong {
    color: #111827 !important;
    font-size: 14px !important;
}

/* Listing empty state */
.fundr-public-listing .fundr-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}


/* ── Campaign Card Progress ── */
.fundr-card__progress {
    padding: 0 20px 20px;
}
.fundr-card__progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}
.fundr-card__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #6366f1);
    border-radius: 4px;
    transition: width .6s ease;
    min-width: 0;
}
.fundr-card__progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #6b7280;
}
.fundr-card__progress-stats strong {
    color: #111827;
}
.fundr-card__raised {
    color: #4f46e5 !important;
    font-weight: 700;
}
.fundr-card__donors {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
}
.fundr-card__donors span {
    font-size: 14px;
}


/* ═══ STEP TABS MOBILE FIX ═══ */
@media (max-width: 600px) {
    .fundr-steps {
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 6px !important;
        padding-bottom: 6px !important;
        flex-wrap: nowrap !important;
    }
    .fundr-steps .fundr-step {
        flex-shrink: 0 !important;
        font-size: 12px !important;
        padding: 8px 12px !important;
        min-width: auto !important;
        white-space: nowrap !important;
    }
    .fundr-steps .fundr-step .fundr-step__number {
        width: 14px !important;
        height: 24px !important;
        font-size: 11px !important;
    }
}
/* Featured/Boosted campaign card */
/* Featured/Boosted campaign card */
.fundr-card__thumb { position: relative; overflow: hidden; }
.fundr-card__featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}
.fundr-card--featured {
    border: 1.5px solid rgba(79, 70, 229, .25);
    box-shadow: 0 0 0 1px rgba(79, 70, 229, .08), 0 4px 20px rgba(79, 70, 229, .1);
}
.fundr-card--featured:hover {
    box-shadow: 0 0 0 1px rgba(79, 70, 229, .12), 0 8px 30px rgba(79, 70, 229, .18);
}

.fundr-notice {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    border-radius: 16px;
    background: linear-gradient(120deg, #f7f8fc 85%, #ede9fe 100%);
    box-shadow: 0 4px 24px rgba(71, 36, 255, 0.04);
    border: none !important;
    padding: 26px 32px;
    margin: 36px 0;
    font-size: 16px;
    color: #2d254c;
}

.fundr-notice__icon {
    font-size: 32px;
    line-height: 1;
    color: #6366f1;
    flex-shrink: 0;
    margin-top: 2px;
}

.fundr-notice strong {
    font-weight: 700;
    color: #1a1626;
}

.fundr-notice a {
    color: #4f46e5;
    text-decoration: underline;
    font-weight: 600;
}

.fundr-notice a:hover {
    color: #6366f1;
}

.fundr-notice p {
    margin: 5px 0 0 0;
    font-size: 15px;
    color: #43386b;
}

.fundr-notice--warning {
    background: linear-gradient(120deg, #fefce8 85%, #f9fafb 100%);
    color: #ad8301;
}
.fundr-notice--info {
    background: linear-gradient(120deg, #f5f3ff 85%, #eef2ff 100%);
    color: #4f46e5;
}
.fundr-notice--success {
    background: linear-gradient(120deg, #f0fdf4 85%, #ecfdf5 100%);
    color: #15803d;
}
.fundr-notice--danger {
    background: linear-gradient(120deg, #fef2f2 85%, #fee2e2 100%);
    color: #dc2626;
}

@media (max-width: 640px) {
    .fundr-notice {
        padding: 16px 10px;
        font-size: 15px;
        gap: 10px;
    }
    .fundr-notice__icon { font-size: 24px; }
}
