/**
 * P2P Fundraisers Display Styles
 * Modern, accessible design inheriting from Elementor Kit theme
 */

/* Error and Status Messages */
.mc-p2p-error,
.mc-p2p-no-results {
    padding: 1rem;
    background: var(--e-global-color-16ff5aa, #f8f9fa);
    border-left: 4px solid var(--e-global-color-primary, #FF001F);
    margin: 1rem 0;
    border-radius: 4px;
    font-family: var(--e-global-typography-text-font-family, "Playfair Display"), Sans-serif;
    color: var(--e-global-color-text, #444444);
}

/* Grid Layout */
.mc-p2p-fundraisers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    font-family: var(--e-global-typography-text-font-family, "Playfair Display"), Sans-serif;
}

/* Fundraiser Card */
.mc-p2p-fundraiser-card {
    position: relative;
    background: var(--e-global-color-2d9e5c4, #ffffff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: var(--e-global-color-text, #444444);
}

.mc-p2p-fundraiser-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: var(--e-global-color-primary, #FF001F);
}

.mc-p2p-fundraiser-card:focus {
    outline: 2px solid var(--e-global-color-primary, #FF001F);
    outline-offset: 2px;
}

/* Image Container */
.mc-p2p-fundraiser-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.mc-p2p-fundraiser-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mc-p2p-fundraiser-card:hover .mc-p2p-fundraiser-image img {
    transform: scale(1.05);
}

/* Card Content */
.mc-p2p-fundraiser-content {
    padding: 1.5rem;
}

/* Fundraiser Name */
.mc-p2p-fundraiser-name {
    margin: 0 0 1rem 0;
    font-family: var(--e-global-typography-546ef8b-font-family, "Playfair Display"), Sans-serif;
    font-size: var(--e-global-typography-546ef8b-font-size, 1.5rem);
    font-weight: var(--e-global-typography-546ef8b-font-weight, 900);
    line-height: var(--e-global-typography-546ef8b-line-height, 1.75rem);
    color: var(--e-global-color-text, #444444);
}

.mc-p2p-fundraiser-name a {
    color: inherit;
    text-decoration: none;
}

/* View Button */
.mc-p2p-view-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--e-global-color-secondary, #FF6679);
    color: var(--e-global-color-2d9e5c4, #ffffff);
    border: none;
    border-radius: 8px;
    font-family: var(--e-global-typography-6268fb9-font-family, "Playfair Display"), Sans-serif;
    font-size: 0.875rem;
    font-weight: var(--e-global-typography-6268fb9-font-weight, bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    min-width: 140px;
}

.mc-p2p-view-button:hover {
    background-color: var(--e-global-color-0b02577, #FF465D);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 70, 93, 0.3);
    color: var(--e-global-color-2d9e5c4, #ffffff);
    text-decoration: none;
}

.mc-p2p-view-button:focus {
    outline: 2px solid var(--e-global-color-primary, #FF001F);
    outline-offset: 2px;
}

.mc-p2p-view-button:active {
    transform: translateY(0);
}

/* Loading States */
.mc-p2p-fundraiser-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.mc-p2p-fundraiser-card.loading .mc-p2p-fundraiser-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mc-p2p-fundraisers-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .mc-p2p-fundraiser-image {
        height: 180px;
    }
    
    .mc-p2p-fundraiser-content {
        padding: 1.25rem;
    }
    
    .mc-p2p-fundraiser-name {
        font-size: var(--e-global-typography-accent-font-size, 2rem);
        line-height: var(--e-global-typography-accent-line-height, 2.25rem);
    }
    
    .mc-p2p-view-button {
        padding: 0.625rem 1.25rem;
        font-size: var(--e-global-typography-4559687-font-size, 0.85rem);
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .mc-p2p-fundraisers-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .mc-p2p-fundraiser-image {
        height: 200px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .mc-p2p-fundraiser-card {
        border: 2px solid var(--e-global-color-text, #444444);
    }
    
    .mc-p2p-view-button {
        background: var(--e-global-color-text, #444444);
        border: 2px solid var(--e-global-color-2d9e5c4, #ffffff);
    }
    
    .mc-p2p-view-button:hover {
        background: var(--e-global-color-2d9e5c4, #ffffff);
        color: var(--e-global-color-text, #444444);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .mc-p2p-fundraiser-card,
    .mc-p2p-fundraiser-image img,
    .mc-p2p-view-button {
        transition: none;
    }
    
    .mc-p2p-fundraiser-card:hover {
        transform: none;
    }
    
    .mc-p2p-fundraiser-card:hover .mc-p2p-fundraiser-image img {
        transform: none;
    }
}

/**
 * P2P Campaign Progress Bar Styles
 * Clean, simple, and accessible progress bar design
 */

/* Base Progress Bar Styles */
.mc-p2p-progress {
    --progress-color: var(--e-global-color-secondary, #FF6679);
    --progress-color-light: var(--e-global-color-2ead49b, #FFBE66);
    --background-color: var(--e-global-color-16ff5aa, #f6f6f6);
    --text-color: var(--e-global-color-text, #444444);
    
    margin: 2rem auto;
    padding: 1.5rem;
    background: var(--e-global-color-2d9e5c4, #ffffff);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: var(--e-global-typography-text-font-family, "Playfair Display"), Sans-serif;
}

/* Progress Header */
.mc-p2p-progress__header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.mc-p2p-progress__title {
    margin: 0;
    font-family: var(--e-global-typography-546ef8b-font-family, "Playfair Display"), Sans-serif;
    font-size: var(--e-global-typography-546ef8b-font-size, 1.5rem);
    font-weight: var(--e-global-typography-546ef8b-font-weight, 900);
    line-height: var(--e-global-typography-546ef8b-line-height, 1.75rem);
    color: var(--text-color);
}

/* Progress Container */
.mc-p2p-progress__container {
    margin: 0.25rem 0;
}

/* Amount Labels */
.mc-p2p-progress__labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-color);
}

.mc-p2p-progress__raised {
    font-weight: bold;
    color: var(--progress-color);
}

.mc-p2p-progress__goal {
    opacity: 0.8;
}

/* Progress Bar */
.mc-p2p-progress__bar {
    position: relative;
    width: 100%;
    height: 12px;
    background: var(--background-color);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.mc-p2p-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--progress-color), var(--progress-color-light));
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 2px; /* Ensure visible progress even at 0% */
    position: relative;
}

.mc-p2p-progress__fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

/* Percentage */
.mc-p2p-progress__percentage {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Stats Section */
.mc-p2p-progress__stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--background-color);
}

.mc-p2p-progress__stat {
    text-align: center;
    flex: 1;
}

.mc-p2p-progress__stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--progress-color);
    line-height: 1.2;
}

.mc-p2p-progress__stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

/* Style Variants */

/* Minimal Style - Even cleaner */
.mc-p2p-progress--minimal {
    background: transparent;
    box-shadow: none;
    padding: 1rem 0;
}

.mc-p2p-progress--minimal .mc-p2p-progress__bar {
    height: 8px;
}

.mc-p2p-progress--minimal .mc-p2p-progress__stats {
    border-top: none;
    margin-top: 1rem;
    padding-top: 0;
}

/* Compact Style - Smaller version */
.mc-p2p-progress--compact {
    padding: 1rem;
    margin: 1rem auto;
}

.mc-p2p-progress--compact .mc-p2p-progress__title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.mc-p2p-progress--compact .mc-p2p-progress__bar {
    height: 10px;
}

.mc-p2p-progress--compact .mc-p2p-progress__stats {
    margin-top: 1rem;
    padding-top: 1rem;
}

.mc-p2p-progress--compact .mc-p2p-progress__stat-value {
    font-size: 1.25rem;
}

/* Animations */
@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.mc-p2p-progress__fill {
    animation: progressGrow 1.2s ease-out;
}

@keyframes progressGrow {
    from { width: 0; }
    to { width: var(--progress-percentage); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mc-p2p-progress {
        margin: 1.5rem auto;
        padding: 1.25rem;
    }
    
    .mc-p2p-progress__labels {
        font-size: 0.8125rem;
    }
    
    .mc-p2p-progress__stats {
        flex-direction: column;
        gap: 0.75rem;
        text-align: left;
    }
    
    .mc-p2p-progress__stat {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .mc-p2p-progress__stat-value {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .mc-p2p-progress {
        padding: 1rem;
    }
    
    .mc-p2p-progress__title {
        font-size: 1.25rem;
    }
    
    .mc-p2p-progress__labels {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
    
    .mc-p2p-progress__bar {
        height: 10px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .mc-p2p-progress {
        border: 2px solid var(--text-color);
    }
    
    .mc-p2p-progress__bar {
        border: 1px solid var(--text-color);
    }
    
    .mc-p2p-progress__fill {
        background: var(--text-color);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .mc-p2p-progress__fill,
    .mc-p2p-progress__fill::after {
        animation: none !important;
        transition: none !important;
    }
}
