/*
 * SmartFarm — Campaign Single Page — Desktop Enhancements
 * Applied only on screens >= 768px; mobile layout is intentionally left intact.
 * All rules are scoped under .wpneo-list-details or specific wpneo classes
 * to avoid leaking onto other WooCommerce pages.
 */

@media screen and (min-width: 768px) {

    .wpneo-list-details {
        --sf-green-900: #70c020;
        --sf-green-800: #90c040;
        --sf-green-700: #90d050;
        --sf-green-500: #a0d060;
        --sf-green-100: #eff8dd;
        --sf-green-050: #f8fce9;
        --sf-brown-050: #f9f3ec;
        --sf-white: #ffffff;
        --sf-text-muted: #606060;
        --sf-border-soft: #d4d4d4;
    }

    /* ── Layout: give the media column a bit more room ───────── */
    .wpneo-list-details .wpneo-campaign-single-left-info {
        width: 57%;
    }

    .wpneo-list-details .wpneo-campaign-summary {
        width: 41%;
    }

    /* ── Right panel: card wrapper with soft shadow ───────────── */
    .wpneo-list-details .wpneo-campaign-summary-inner {
        background: var(--sf-white);
        border: 1px solid var(--sf-border-soft);
        border-radius: 16px;
        padding: 22px 24px;
        box-shadow: 0 6px 22px rgba(96, 96, 96, .16);
    }

    /* ── Campaign title ───────────────────────────────────────── */
    .wpneo-list-details h2.wpneo-campaign-title {
        font-size: 22px;
        line-height: 1.35;
        font-weight: 800;
        color: var(--sf-green-900);
        margin: 0 0 14px;
        letter-spacing: -0.2px;
    }

    /* ── Stats grid ───────────────────────────────────────────── */
    .wpneo-list-details .campaign-funding-info {
        background: var(--sf-brown-050);
        border: 1px solid var(--sf-border-soft);
        border-radius: 12px;
        padding: 0;
        margin: 0 0 16px;
        overflow: hidden;
    }

    .wpneo-list-details .campaign-funding-info ul {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .wpneo-list-details .campaign-funding-info ul li {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 13px 6px;
        border-right: 1px solid var(--sf-border-soft);
        margin-right: 0 !important;
    }

    .wpneo-list-details .campaign-funding-info ul li:last-child {
        border-right: none;
        display: none;
    }

    .wpneo-list-details .campaign-funding-info ul li .funding-amount {
        font-size: 14px;
        font-weight: 800;
        color: var(--sf-green-800);
        margin: 0 0 3px;
        line-height: 1.2;
    }

    /* "Campaign End Method" li — displayed differently */
    .wpneo-list-details .campaign-funding-info ul li:last-child .funding-amount {
        font-size: 11px;
        font-weight: 700;
        color: var(--sf-green-800);
        line-height: 1.3;
        white-space: normal;
        text-align: center;
    }

    .wpneo-list-details .campaign-funding-info ul li .info-text {
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.45px;
        color: var(--sf-text-muted);
    }

    /* ── Progress row ─────────────────────────────────────────── */
    .wpneo-list-details .wpneo-campaign-summary .wpneo-raised-percent {
        border-top: none;
        padding: 4px 0 2px;
        display: flex;
        align-items: baseline;
        gap: 4px;
    }

    .wpneo-list-details .wpneo-raised-percent .wpneo-meta-name {
        font-size: 11px;
        font-weight: 500;
        color: var(--sf-text-muted);
        padding-left: 0;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    .wpneo-list-details .wpneo-raised-percent .wpneo-meta-desc {
        font-size: 16px;
        font-weight: 800;
        color: var(--sf-green-800);
        padding-left: 2px;
    }

    .wpneo-list-details .wpneo-campaign-summary .wpneo-raised-bar {
        padding: 0;
        margin: 6px 0 18px;
    }

    .wpneo-list-details #neo-progressbar {
        height: 10px;
        border-radius: 999px;
        background: #e1f0be;
        overflow: hidden;
    }

    .wpneo-list-details #neo-progressbar > div {
        height: 100%;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--sf-green-500) 0%, var(--sf-green-900) 100%);
        transition: width 0.8s cubic-bezier(.4, 0, .2, 1);
    }

    /* ── Predefined amount chips ──────────────────────────────── */
    .wpneo-list-details ul.wpcf_predefined_pledge_amount {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        list-style: none;
        margin: 0 0 14px;
        padding: 0;
    }

    .wpneo-list-details ul.wpcf_predefined_pledge_amount li {
        margin: 0;
        display: inline-block;
    }

    .wpneo-list-details ul.wpcf_predefined_pledge_amount li a,
    .wpneo-list-details ul.wpcf_predefined_pledge_amount li a[data-predefined-price] {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px 16px;
        border: 2px solid var(--sf-border-soft);
        border-radius: 999px;
        color: var(--sf-green-800);
        font-size: 13px;
        font-weight: 700;
        text-decoration: none;
        background: var(--sf-white);
        line-height: 1;
        box-shadow: 0 2px 6px rgba(96, 96, 96, 0.1);
        transform: translateY(0);
        transition: background 0.16s, color 0.16s, border-color 0.16s, box-shadow 0.16s, transform 0.12s;
        white-space: nowrap;
        cursor: pointer;
    }

    .wpneo-list-details ul.wpcf_predefined_pledge_amount li a:hover,
    .wpneo-list-details ul.wpcf_predefined_pledge_amount li a[data-predefined-price]:hover {
        background: #f7fbef;
        color: var(--sf-green-900);
        border-color: var(--sf-green-700);
        box-shadow: 0 6px 14px rgba(96, 96, 96, 0.18);
        transform: translateY(-1px);
    }

    .wpneo-list-details ul.wpcf_predefined_pledge_amount li a:active,
    .wpneo-list-details ul.wpcf_predefined_pledge_amount li a[data-predefined-price]:active {
        transform: translateY(1px) scale(0.985);
        box-shadow: 0 1px 4px rgba(96, 96, 96, 0.2);
    }

    .wpneo-list-details ul.wpcf_predefined_pledge_amount li a.selected,
    .wpneo-list-details ul.wpcf_predefined_pledge_amount li a[data-predefined-price].selected {
        background: var(--sf-green-500);
        color: var(--sf-white);
        border-color: var(--sf-green-500);
        box-shadow: 0 8px 16px rgba(96, 96, 96, 0.2);
        transform: translateY(-1px);
    }

    .wpneo-list-details ul.wpcf_predefined_pledge_amount li a:focus-visible,
    .wpneo-list-details ul.wpcf_predefined_pledge_amount li a[data-predefined-price]:focus-visible {
        outline: 2px solid rgba(128, 80, 16, 0.5);
        outline-offset: 2px;
    }

    /* ── Donate form strip ────────────────────────────────────── */
    .wpneo-list-details .wpneo-single-sidebar form.cart {
        display: flex;
        align-items: center;
        gap: 8px;
        background: var(--sf-green-050);
        border: 1px solid var(--sf-border-soft);
        border-radius: 12px;
        padding: 12px 14px;
        margin-bottom: 14px;
    }

    .wpneo-list-details .wpneo-single-sidebar form.cart > span {
        font-size: 15px;
        font-weight: 700;
        color: var(--sf-green-900);
        flex-shrink: 0;
    }

    .wpneo-list-details input[type=number].wpneo_donate_amount_field {
        flex: 0 0 auto;
        width: 110px;
        max-width: 120px;
        height: 42px;
        padding: 0 10px;
        border: 2px solid var(--sf-border-soft) !important;
        border-radius: 8px !important;
        font-size: 15px;
        font-weight: 700;
        color: var(--sf-green-800);
        background: var(--sf-white);
        display: inline-block;
    }

    .wpneo-list-details .wpneo_donate_button {
        flex: 1;
        min-width: 0;
        height: 42px;
        background: linear-gradient(135deg, var(--sf-green-800) 0%, var(--sf-green-900) 100%);
        color: var(--sf-white) !important;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        transition: opacity 0.15s;
        margin: 0 !important;
        padding: 0 14px;
        letter-spacing: 0.2px;
        white-space: nowrap;
    }

    .wpneo-list-details .wpneo_donate_button:hover {
        opacity: 0.88;
    }

    /* ── Location badge ───────────────────────────────────────── */
    .wpneo-list-details .wpneo-location-wrapper {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        background: var(--sf-green-050);
        border: 1px solid var(--sf-border-soft);
        border-radius: 999px;
        padding: 4px 12px 4px 8px;
        font-size: 12px;
        font-weight: 600;
        color: var(--sf-green-900);
        margin-top: 2px;
        margin-bottom: 14px;
        width: auto !important;
    }

    .wpneo-list-details .wpneo-campaign-creator-info-wrapper {
        display: none !important;
    }

    .wpneo-list-details .smartfarm-project-dates-wrapper {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: var(--sf-brown-050);
        border: 1px solid var(--sf-border-soft);
        border-radius: 999px;
        padding: 4px 12px;
        margin: 0 0 14px;
        width: auto !important;
        color: var(--sf-green-900);
        font-size: 12px;
        font-weight: 600;
        order: 3;
    }

    .wpneo-list-details .smartfarm-project-date {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        white-space: nowrap;
    }

    .wpneo-list-details .smartfarm-project-date-label {
        color: var(--sf-text-muted);
        font-weight: 600;
    }

    .wpneo-list-details .smartfarm-project-date-value {
        color: var(--sf-green-900);
    }

    .wpneo-list-details .smartfarm-project-date-separator {
        color: var(--sf-border-soft);
    }

    .wpneo-list-details .smartfarm-project-profitability-wrapper {
        display: inline-flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        background: var(--sf-green-050);
        border: 1px solid var(--sf-border-soft);
        border-radius: 999px;
        padding: 4px 12px;
        margin: 0 0 14px;
        width: auto !important;
        color: var(--sf-green-900);
        font-size: 12px;
        font-weight: 600;
        order: 4;
    }

    .wpneo-list-details .smartfarm-project-profitability-item {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        white-space: nowrap;
    }

    .wpneo-list-details .smartfarm-project-profitability-label {
        color: var(--sf-text-muted);
        font-weight: 600;
    }

    .wpneo-list-details .smartfarm-project-profitability-value {
        color: var(--sf-green-900);
    }

    .wpneo-list-details .smartfarm-project-profitability-separator {
        color: var(--sf-border-soft);
    }

    .wpneo-list-details .smartfarm-project-profitability-wrapper.smartfarm-project-profitability-wrapper-plugin {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        background: #f7fbef;
        border: 1px solid #d9e8c5;
        border-radius: 8px;
        padding: 12px;
        margin: 0 0 14px;
        width: 100% !important;
        color: var(--sf-green-900);
        font-size: 12px;
        font-weight: 600;
        order: 4;
        box-shadow: 0 6px 16px rgba(96, 96, 96, 0.1);
    }

    .wpneo-list-details .smartfarm-project-profitability-title {
        display: block;
        font-size: 13px;
        line-height: 1.2;
        font-weight: 800;
        color: var(--sf-green-900);
    }

    .wpneo-list-details .smartfarm-project-profitability-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .wpneo-list-details .smartfarm-project-profitability-wrapper-plugin .smartfarm-project-profitability-item {
        display: grid;
        gap: 3px;
        min-width: 0;
        background: var(--sf-white);
        border: 1px solid #e1ecd1;
        border-radius: 8px;
        padding: 8px;
        white-space: normal;
    }

    .wpneo-list-details .smartfarm-project-profitability-wrapper-plugin .smartfarm-project-profitability-item-highlight {
        background: #eef8dd;
        border-color: #cfe8ad;
    }

    .wpneo-list-details .smartfarm-project-profitability-wrapper-plugin .smartfarm-project-profitability-item-margin {
        background: #fef9e7;
        border-color: #f5e279;
    }

    .wpneo-list-details .smartfarm-project-profitability-wrapper-plugin .smartfarm-project-profitability-item-margin .smartfarm-project-profitability-value {
        color: #7d6608;
    }

    .wpneo-list-details .smartfarm-project-profitability-wrapper-plugin .smartfarm-project-profitability-label {
        color: var(--sf-text-muted);
        font-size: 10px;
        line-height: 1.2;
        font-weight: 700;
        text-transform: uppercase;
    }

    .wpneo-list-details .smartfarm-project-profitability-wrapper-plugin .smartfarm-project-profitability-value {
        color: var(--sf-green-900);
        font-size: 14px;
        line-height: 1.2;
        font-weight: 800;
        overflow-wrap: anywhere;
    }

    .wpneo-list-details .smartfarm-project-profitability-production {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        color: var(--sf-text-muted);
        border-top: 1px solid #d9e8c5;
        padding-top: 9px;
    }

    .wpneo-list-details .smartfarm-project-profitability-production strong {
        color: var(--sf-green-900);
        font-weight: 800;
        white-space: nowrap;
    }

    .wpneo-list-details .smartfarm-project-profitability-note {
        display: block;
        color: #6d7a5e;
        font-size: 11px;
        line-height: 1.35;
    }

    /* ── Creator card ─────────────────────────────────────────── */
    .wpneo-list-details .wpneo-campaign-creator-info-wrapper {
        display: flex;
        align-items: center;
        gap: 14px;
        background: var(--sf-green-050);
        border: 1px solid var(--sf-border-soft);
        border-radius: 12px;
        padding: 14px 16px;
        margin: 0 0 4px;
    }

    .wpneo-list-details .wpneo-campaign-creator-avatar {
        float: none;
        flex-shrink: 0;
        margin: 0;
    }

    .wpneo-list-details .wpneo-campaign-creator-avatar img,
    .wpneo-list-details .wpneo-campaign-creator-avatar .avatar {
        width: 50px !important;
        height: 50px !important;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid var(--sf-border-soft);
        display: block;
    }

    .wpneo-list-details .wpneo-campaign-creator-details {
        font-size: 13px;
        flex: 1;
        min-width: 0;
    }

    .wpneo-list-details .wpneo-campaign-creator-details > p {
        margin: 0 0 2px !important;
        padding-bottom: 0 !important;
        line-height: 1.4;
    }

    .wpneo-list-details .wpneo-campaign-creator-details > p:first-child a {
        font-size: 14px;
        font-weight: 700;
        color: var(--sf-green-800);
    }

    .wpneo-list-details .wpneo-campaign-creator-details > p:nth-child(2) {
        font-size: 11px;
        color: var(--sf-text-muted);
    }

    .wpneo-list-details .wpneo-campaign-creator-details .wpneo-link-style1 {
        font-size: 12px;
    }

    /* ── Tooltip hidden (shown via JS only) ───────────────────── */
    .wpneo-list-details .wpneo-tooltip {
        font-size: 11px;
        color: #dc2626;
        margin-bottom: 6px;
    }

    /* ── Smooth image/video rendering ────────────────────────── */
    .wpneo-list-details .wpneo-post-img iframe,
    .wpneo-list-details .wpneo-post-img video,
    .wpneo-list-details a.wpneo-single-main-image img {
        border-radius: 12px;
        overflow: hidden;
    }

}
/* end @media desktop */

/* ── Détails du projet : même style que campaign-funding-info ────── */
.sf-project-stats {
    background: #f9f3ec;
    border: 1px solid #d4d4d4;
    border-radius: 12px;
    padding: 0;
    margin: 0 0 12px;
    overflow: hidden;
}

.sf-project-stats ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    list-style: none;
    margin: 0;
    padding: 0;
}

.sf-project-stats ul li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 13px 6px;
    border-right: 1px solid #d4d4d4;
}

.sf-project-stats ul li:last-child {
    border-right: none;
}

.sf-project-stats ul li .funding-amount {
    font-size: 14px;
    font-weight: 800;
    color: #90c040;
    margin: 0 0 3px;
    line-height: 1.2;
    white-space: nowrap;
}

.sf-project-stats ul li .info-text {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.45px;
    color: #606060;
}

.sf-project-stats .sf-stat-roi .funding-amount {
    color: #2f9b55;
}

.sf-project-stats .sf-stat-margin .funding-amount {
    color: #9a7a00;
}

/* ── Votre participation ─────────────────────────────────────────── */
.sf-block-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #444;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e8f5d8;
}

.sf-participation-wrapper {
    background: #fff;
    border: 1px solid #cfe8ad;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 4px;
}

.sf-participation-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.sf-part-item {
    flex: 1 1 calc(33% - 8px);
    min-width: 75px;
    background: #f6f6f6;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sf-part-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #606060;
    letter-spacing: 0.4px;
}

.sf-part-value {
    font-size: 13px;
    font-weight: 800;
    color: #222;
    overflow-wrap: anywhere;
}

.sf-part-item--gain {
    background: #eef8dd;
    border-color: #cfe8ad;
}

.sf-part-item--gain .sf-part-value { color: #2f7a0e; }

.sf-part-item--total {
    background: #e8f4ff;
    border-color: #b3d4f0;
}

.sf-part-item--total .sf-part-value { color: #1a5a9a; }

.sf-participation-note {
    display: block;
    font-size: 10px;
    color: #909090;
    font-style: italic;
    border-top: 1px solid #e8f5d8;
    padding-top: 8px;
}

/* Bottom copy in story tab */
.sf-campaign-summary-story-bottom .sf-project-stats,
.sf-campaign-summary-story-bottom .sf-participation-wrapper {
    max-width: 520px;
}

/* ── Campaign summary dupliquée dans l'onglet Historique ──────── */
.sf-campaign-summary-story-bottom {
    width: 100% !important;
    float: none !important;
    clear: both;
    margin-top: 32px;
}

.sf-campaign-summary-story-bottom .wpneo-campaign-summary-inner {
    max-width: 520px;
}

.sf-campaign-summary-story-bottom h2.wpneo-campaign-title {
    display: none;
}

.wpneo-list-details .wpneo-author-info {
    display: none !important;
}

/* ── Carte contribution unifiée ─────────────────────────────────── */
.sf-contribution-card {
    border: 1px solid #d4d4d4;
    border-radius: 12px;
    overflow: hidden;
    margin: 0 0 14px;
    background: #fff;
}

.sf-contribution-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #f8fce9;
    border-bottom: 1px solid #d4d4d4;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #606060;
}

.sf-contribution-card-header .sf-contribution-arrow {
    color: #90c040;
    font-size: 16px;
}

.sf-contribution-card ul.wpcf_predefined_pledge_amount {
    padding: 12px 14px 4px !important;
    margin-bottom: 0 !important;
}

.sf-contribution-card form.cart {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    padding: 8px 14px 12px !important;
}

.sf-contribution-divider {
    height: 1px;
    background: #d4d4d4;
    margin: 0 14px;
}

.sf-contribution-card .sf-participation-wrapper {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    padding: 12px 14px !important;
}

/* ── Progress row : barre + % sur la même ligne ──────────────────── */
.sf-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 16px;
}

.sf-progress-row .wpneo-raised-bar {
    flex: 1;
    padding: 0;
    margin: 0;
}

.sf-progress-row .wpneo-raised-percent {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    padding: 0;
    border-top: none;
}

.sf-progress-row .wpneo-meta-name {
    display: none;
}

.sf-progress-row .wpneo-meta-desc {
    font-size: 22px;
    font-weight: 900;
    color: #70c020;
    line-height: 1;
    padding-left: 0;
}

/* ── Section infos du projet ──────────────────────────────────────── */
.sf-project-info-section {
    background: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 12px;
    overflow: hidden;
    margin: 0 0 14px;
}

.sf-project-info-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #444;
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid #d4d4d4;
    background: #f8fce9;
}

.sf-project-info-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
}

.sf-project-info-content .wpneo-location-wrapper {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.sf-project-info-content .smartfarm-project-dates-wrapper {
    margin: 0 !important;
}
