/* TPFund Classy Project List Styles */

/* Container */
.tpfund-classy-list {
    width: 100%;
    max-width: 100%;
    margin: 0 auto !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --tpfund-brand: #3098d4;
    --tpfund-brand-dark: #257fb5;
    --tpfund-brand-darker: #1f6f9f;
    --tpfund-brand-soft: #eef6fc;
    box-sizing: border-box;
    list-style: none !important;
    padding: 0 !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tpfund-classy-list::marker {
    content: none;
}

.tpfund-classy-list > li::marker,
.tpfund-classy-list__item::marker {
    content: none;
}

.tpfund-classy-list *,
.tpfund-classy-list *::before,
.tpfund-classy-list *::after {
    box-sizing: border-box;
}

/* List Items */
.tpfund-classy-list__item {
    display: flex !important;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    list-style: none !important;
    margin: 0 !important;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tpfund-classy-list__item:hover {
    background: var(--tpfund-brand-soft);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.tpfund-classy-list__item:last-child {
    margin-bottom: 0;
}

/* Image */
.tpfund-classy-list__image {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #eef6fc 0%, #d9ecf9 100%);
}

.tpfund-classy-list__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.tpfund-classy-list__item:hover .tpfund-classy-list__image img {
    transform: scale(1.05);
}

.tpfund-classy-list__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
}

/* Content */
.tpfund-classy-list__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Header Row: Title + Status inline */
.tpfund-classy-list__header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Title */
.tpfund-classy-list__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #000;
}

.tpfund-classy-list__title a {
    color: #000000 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tpfund-classy-list__title a:hover {
    color: var(--tpfund-brand);
}

/* Blurb */
.tpfund-classy-list__blurb {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Status Badge (inline with title) */
.tpfund-classy-list__status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--tpfund-brand);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Category Badge */
.tpfund-classy-list__category {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #3098d4;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    text-transform: capitalize;
    margin-top: 8px;
}

/* Bottom Row: Progress + Donate */
.tpfund-classy-list__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

/* Progress Section (left side) */
.tpfund-classy-list__progress-section {
    flex: 1;
    min-width: 0;
}

.tpfund-classy-list__progress-info {
    font-size: 14px;
    margin-bottom: 8px;
}

.tpfund-classy-list__progress-bar {
    width: 100%;
    max-width: 280px;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.tpfund-classy-list__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tpfund-brand) 0%, var(--tpfund-brand-dark) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.tpfund-classy-list__raised {
    color: var(--tpfund-brand-dark);
    font-weight: 700;
    font-size: 16px;
}

.tpfund-classy-list__goal {
    color: #6b7280;
    font-weight: 500;
}

/* Donate Section (right side) */
.tpfund-classy-list__donate-section {
    flex-shrink: 0;
}

.tpfund-classy-list__donate-form {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    
    max-width:250px;
}

.tpfund-classy-list__currency-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    font-size: 16px;
    border: 1px solid #e5e7eb;
    border-right: none;
    border-radius: 8px 0 0 8px;
}


.tpfund-classy-list__amount {
    width:80px !important;
    margin-bottom:1px !important;
    
}

.tpfund-classy-list__amount {
    
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-right: none;
    font-size: 16px;
    font-weight: 500;
    color: #111827;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -moz-appearance: textfield;
}

.tpfund-classy-list__amount::-webkit-outer-spin-button,
.tpfund-classy-list__amount::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tpfund-classy-list__amount:focus {
    border-color: var(--tpfund-brand);
    box-shadow: inset 0 0 0 1px var(--tpfund-brand);
}

.tpfund-classy-list__amount::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.tpfund-classy-list__donate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--tpfund-brand) 0%, var(--tpfund-brand-dark) 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 0 8px 8px 0;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tpfund-classy-list__donate:hover {
    background: linear-gradient(135deg, var(--tpfund-brand-dark) 0%, var(--tpfund-brand-darker) 100%);
    color: #fff;
}

/* Empty State */
.tpfund-classy-list__empty {
    padding: 60px 20px;
    text-align: center;
    color: #6b7280;
    font-size: 16px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
}

/* ===================== */
/* Container & Loading   */
/* ===================== */

.tpfund-classy-container {
    position: relative;
}

.tpfund-classy-list-wrapper {
    transition: opacity 0.3s ease;
}

.tpfund-loading .tpfund-classy-list-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #3098d4;
    border-radius: 50%;
    animation: tpfund-spin 0.8s linear infinite;
}

@keyframes tpfund-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ===================== */
/* Pagination Styles     */
/* ===================== */

.tpfund-classy-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding: 16px 0;
}

.tpfund-classy-pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #3098d4;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tpfund-classy-pagination__item:hover {
    background: #257fb5;
    color: #fff;
}

.tpfund-classy-pagination__item--active {
    background: #1f6f9f;
    color: #fff;
    font-weight: 700;
    pointer-events: none;
}

.tpfund-classy-pagination__item--active:hover {
    background: #1f6f9f;
    color: #fff;
}

.tpfund-classy-pagination__item--disabled {
    color: #fff;
    background: #a8d4ed;
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.6;
}

.tpfund-classy-pagination__item--prev,
.tpfund-classy-pagination__item--next {
    font-weight: 600;
}

.tpfund-classy-pagination__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    font-size: 14px;
    color: #6b7280;
    letter-spacing: 2px;
}

.tpfund-classy-pagination__info {
    width: 100%;
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
    color: #6b7280;
}

/* ===================== */
/* Responsive: Tablet    */
/* ===================== */

@media (max-width: 992px) {
    .tpfund-classy-list__item {
        gap: 18px;
        padding: 18px;
    }

    .tpfund-classy-list__image {
        width: 180px;
        height: 120px;
    }

    .tpfund-classy-list__title {
        font-size: 18px;
    }

    .tpfund-classy-list__blurb {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }

    .tpfund-classy-list__bottom {
        gap: 16px;
    }

    .tpfund-classy-list__progress-bar {
        max-width: 200px;
    }
}

/* ===================== */
/* Responsive: Mobile    */
/* ===================== */

@media (max-width: 768px) {
    .tpfund-classy-list__item {
        flex-direction: column;
        gap: 14px;
        padding: 16px;
        border-radius: 10px;
    }

    .tpfund-classy-list__image {
        width: 100%;
        height: 220px;
        border-radius: 8px;
    }

    .tpfund-classy-list__content {
        gap: 10px;
    }

    .tpfund-classy-list__header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tpfund-classy-list__title {
        font-size: 18px;
    }

    .tpfund-classy-list__blurb {
        font-size: 14px;
        line-height: 1.5;
        -webkit-line-clamp: 3;
    }

    /* Stack bottom row on mobile */
    .tpfund-classy-list__bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .tpfund-classy-list__progress-section {
        width: 100%;
    }

    .tpfund-classy-list__progress-bar {
        max-width: 100%;
    }

    .tpfund-classy-list__donate-section {
        width: 100%;
    }

    .tpfund-classy-list__donate-form {
        width: 100%;
        display: flex;
    }

    .tpfund-classy-list__amount {
        flex: 1;
        min-width: 0;
    }

    .tpfund-classy-list__donate {
        padding: 14px 24px;
    }

    /* Pagination Mobile */
    .tpfund-classy-pagination {
        gap: 6px;
    }

    .tpfund-classy-pagination__item {
        min-width: 40px;
        height: 40px;
        padding: 6px 12px;
        font-size: 14px;
        background: #3098d4;
        color: #fff;
    }

    .tpfund-classy-pagination__dots {
        min-width: 32px;
        height: 40px;
    }
}

/* ===================== */
/* Responsive: Small     */
/* ===================== */

@media (max-width: 480px) {
    .tpfund-classy-list__item {
        padding: 14px;
    }

    .tpfund-classy-list__image {
        height: 180px;
    }

    .tpfund-classy-list__header {
        gap: 6px;
    }

    .tpfund-classy-list__title {
        font-size: 16px;
    }

    .tpfund-classy-list__status {
        padding: 3px 8px;
        font-size: 10px;
    }

    .tpfund-classy-list__blurb {
        font-size: 13px;
    }

    .tpfund-classy-list__category {
        padding: 3px 8px;
        font-size: 10px;
    }

    .tpfund-classy-list__raised {
        font-size: 15px;
    }

    .tpfund-classy-list__donate-form {
        flex-direction: column;
        border-radius: 8px;
    }

    .tpfund-classy-list__currency-symbol {
        border-radius: 8px 8px 0 0;
        border-right: 1px solid #e5e7eb;
        border-bottom: none;
        padding: 10px;
    }

    .tpfund-classy-list__amount {
        border-radius: 0;
        border-right: 1px solid #e5e7eb;
        border-bottom: none;
        width: 100%;
        text-align: center;
    }

    .tpfund-classy-list__donate {
        border-radius: 0 0 8px 8px;
        padding: 12px 20px;
        font-size: 13px;
    }

    /* Pagination Small */
    .tpfund-classy-pagination__item {
        min-width: 36px;
        height: 36px;
        padding: 4px 10px;
        font-size: 13px;
        border-radius: 6px;
        background: #3098d4;
        color: #fff;
    }

    .tpfund-classy-pagination__item--prev,
    .tpfund-classy-pagination__item--next {
        padding: 4px 12px;
    }
}

/* ===================== */
/* Dark Mode Support     */
/* ===================== */

@media (prefers-color-scheme: dark) {
    .tpfund-classy-list__item {
        border-color: #374151;
    }

    .tpfund-classy-list__item:hover {
        background: #e8e8e9;
    }

    .tpfund-classy-list__title {
        color: #000 !important;
    }

    .tpfund-classy-list__title a:hover {
        color: var(--tpfund-brand);
    }

    .tpfund-classy-list__blurb {
        color: #000000;
    }

    .tpfund-classy-list__category {
        background: #3098d4;
        color: #d1e9f7;
    }

    .tpfund-classy-list__status {
        background: var(--tpfund-brand);
        color: #fff;
    }

    .tpfund-classy-list__bottom {
        border-top-color: #374151;
    }

    .tpfund-classy-list__progress-bar {
        background: #374151;
    }

    .tpfund-classy-list__goal {
        color: #9ca3af;
    }

    .tpfund-classy-list__empty {
        background: #1f2937;
        border-color: #374151;
        color: #9ca3af;
    }

    .tpfund-classy-pagination__item {
        background: #3098d4;
        color: #fff;
    }

    .tpfund-classy-pagination__item:hover {
        background: #257fb5;
        color: #fff;
    }

    .tpfund-classy-pagination__item--active {
        background: #1f6f9f;
        color: #fff;
    }

    .tpfund-classy-pagination__item--disabled {
        background: #a8d4ed;
        color: #fff;
        opacity: 0.6;
    }

    .tpfund-classy-pagination__info {
        color: #9ca3af;
    }
}
