/**
 * ComboDonate fundraiser page — theme overrides
 * Loaded after plugin CSS to customize layout and typography
 */

/* ── Base font reset (plugin uses 10px) ── */
.fundraisers-container {
    font-size: 16px;
    line-height: 1.6;
    color: #1a1a1a;
}

/* ── Description section ── */
.fundraisers-container .single-description {
    font-size: 1rem;
    line-height: 1.75;
    color: #333;
    margin-bottom: 48px;
}

.fundraisers-container .single-description h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 3px solid #ef9127;
    line-height: 1.3;
}

.fundraisers-container .single-description h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 40px 0 16px 0;
    line-height: 1.3;
}

.fundraisers-container .single-description h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #333;
    margin: 32px 0 12px 0;
    line-height: 1.4;
}

.fundraisers-container .single-description p {
    font-size: 1rem;
    line-height: 1.75;
    color: #333;
    margin-bottom: 16px;
}

.fundraisers-container .single-description strong,
.fundraisers-container .single-description b {
    font-weight: 700;
    color: #1a1a1a;
}

/* Lists inside description */
.fundraisers-container .single-description ul,
.fundraisers-container .single-description ol {
    margin: 16px 0 24px 0;
    padding-left: 24px;
}

.fundraisers-container .single-description li {
    margin-bottom: 8px;
    line-height: 1.65;
    color: #333;
}

.fundraisers-container .single-description ul li {
    list-style-type: disc;
}

.fundraisers-container .single-description ul li::marker {
    color: #ef9127;
}

/* Blockquotes */
.fundraisers-container .single-description blockquote {
    border-left: 4px solid #ef9127;
    margin: 24px 0;
    padding: 16px 24px;
    background: #fef8f4;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}

.fundraisers-container .single-description blockquote p {
    margin-bottom: 0;
    font-size: 1.05rem;
}

/* Links */
.fundraisers-container .single-description a {
    color: #ef9127;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.fundraisers-container .single-description a:hover {
    color: var(--combo-donate-primary, #2E8B57);
}

/* ── YouTube / iframe embeds ── */
.fundraisers-container .single-description iframe,
.fundraisers-container .single-description .wp-block-embed,
.fundraisers-container .single-description .wp-embed-responsive {
    max-width: 100%;
    margin: 32px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.fundraisers-container .single-description .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.fundraisers-container .single-description .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 12px;
}

/* Plain iframe (not wrapped in embed block) */
.fundraisers-container .single-description>iframe {
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    border: 0;
}

/* ── Images in description ── */
.fundraisers-container .single-description img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.fundraisers-container .single-description figure {
    margin: 16px 0;
}

.fundraisers-container .single-description figcaption,
.fundraisers-container .single-description .wp-caption-text {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-top: 6px;
    font-style: italic;
}

/* ── WordPress Classic Gallery ── */
.fundraisers-container .single-description .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin: 32px 0;
    padding: 0;
}

.fundraisers-container .single-description .gallery-item {
    margin: 0 !important;
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.fundraisers-container .single-description .gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.fundraisers-container .single-description .gallery-icon {
    line-height: 0;
}

.fundraisers-container .single-description .gallery-icon a {
    display: block;
}

.fundraisers-container .single-description .gallery-icon img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
    display: block;
    transition: transform 0.3s;
}

.fundraisers-container .single-description .gallery-item:hover .gallery-icon img {
    transform: scale(1.05);
}

.fundraisers-container .single-description .gallery-caption {
    padding: 8px 10px;
    font-size: 0.8rem;
    color: #555;
    background: #fafafa;
    margin: 0;
    font-style: italic;
}

/* 2-column gallery override */
.fundraisers-container .single-description .gallery-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.fundraisers-container .single-description .gallery-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.fundraisers-container .single-description .gallery-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 600px) {
    .fundraisers-container .single-description .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .fundraisers-container .single-description .gallery-icon img {
        height: 140px;
    }
}

/* ── h2.western (classic editor heading) ── */
.fundraisers-container .single-description h2.western,
.fundraisers-container .single-description h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 48px 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ef9127;
    line-height: 1.3;
}

.fundraisers-container .single-description h2:first-child {
    margin-top: 0;
}

/* ── Info section tweaks ── */
.fundraisers-container .fundraiser-main-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.2;
    margin-bottom: 20px;
}

.fundraisers-container .reason-section {
    font-size: 1rem;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
    margin-bottom: 24px;
}

.fundraisers-container .reason-section span {
    font-size: 0.95rem;
    color: #555;
}

.fundraisers-container .reason-section strong {
    color: #1a1a1a;
}

/* Person details box */
.fundraisers-container .person-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid #e9ecef;
}

.fundraisers-container .person-item {
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.fundraisers-container .person-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.fundraisers-container .person-item span {
    font-size: 0.95rem;
    color: #444;
}

.fundraisers-container .person-item .bold {
    font-weight: 600;
    color: #1a1a1a;
}

/* ── Progress bar ── */
.fundraisers-container .progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 14px;
    overflow: hidden;
    margin: 12px 0;
}

.fundraisers-container .progress-fill {
    background: linear-gradient(90deg, #e98e26 0%, #f4af44 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    position: relative;
}

.fundraisers-container .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.fundraisers-container .progress-amount {
    font-size: 2rem;
}

.fundraisers-container .progress-amount strong {
    color: #ef9127;
}

.fundraisers-container .progress-percentage {
    font-size: 1rem;
    color: #888;
    font-weight: 400;
}

.fundraisers-container .progress-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
    margin-top: 4px;
}

/* ── Donate button ── */
.fundraisers-container .donate-main-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ef9127 !important;
    color: white !important;
    font-size: 1.1rem;
    padding: 16px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.fundraisers-container .donate-main-btn:hover {
    background: #e98e26 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(239, 145, 39, 0.4);
}

.fundraisers-container .donate-main-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.fundraisers-container .share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: transparent;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.fundraisers-container .share-btn:hover {
    border-color: #ef9127;
    color: #ef9127;
    background: #fff8f4;
}

.fundraisers-container .share-btn img {
    width: 18px;
    height: 18px;
    transition: filter 0.2s;
}

.fundraisers-container .share-btn:hover img {
    filter: none;
}

/* ── Side info ── */
.fundraisers-container .donation-side-info {
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #ef9127;
}

.fundraisers-container .side-title {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.fundraisers-container .side-description {
    font-size: 0.95rem;
    color: #555;
    padding-bottom: 0;
}

.fundraisers-container .side-description p {
    margin-bottom: 8px;
}

/* ── Payment methods ── */
.fundraisers-container .payment-methods {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px 0;
    margin-top: 24px;
    border-top: 1px solid #eee;
}

.fundraisers-container .payment-methods .payment-logo {
    height: 28px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.2s;
    filter: grayscale(30%);
}

.fundraisers-container .payment-methods .payment-logo:hover {
    opacity: 1;
    filter: none;
}

/* ── Bank account ── */
.fundraisers-container .bank-account {
    text-align: center;
    padding: 16px;
    margin-top: 8px;
    background: #f8f9fa;
    border-radius: 8px;
}

.fundraisers-container .bank-title {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 4px;
}

.fundraisers-container .bank-number {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    padding: 8px 12px;
    background: white;
    border: 1px dashed #ccc;
    border-radius: 6px;
    display: inline-block;
    transition: all 0.2s;
}

.fundraisers-container .bank-number:hover {
    border-color: #ef9127;
    background: #fff8f4;
}

.fundraisers-container .bank-international {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
    text-align: left;
}

.fundraisers-container .bank-int-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.fundraisers-container .bank-detail {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 4px;
    line-height: 1.6;
}

.fundraisers-container .bank-detail strong {
    color: #333;
}

/* ── Donations table ── */
.fundraisers-container .donations-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    min-height: auto;
}

.fundraisers-container .donations-header {
    padding: 20px 24px 16px;
    background: #fafafa;
}

.fundraisers-container .donations-title {
    font-size: 1.15rem;
}

.fundraisers-container .donations-tab {
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 20px;
}

.fundraisers-container .donation-row {
    padding: 14px 24px;
}

.fundraisers-container .donor-name {
    font-size: 0.95rem;
}

.fundraisers-container .donation-time {
    font-size: 0.8rem;
}

.fundraisers-container .donation-amount {
    font-size: 1rem;
    font-weight: 700;
}

.fundraisers-container .donation-amount.amount-visible {
    color: var(--combo-donate-primary, #2E8B57);
}

/* ── Fundraiser tag ── */
.fundraisers-container .fundraiser-urgent-tag {
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 0 0 8px 0;
    text-transform: none;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* ── Featured image ── */
.fundraisers-container .fundraiser-image-container {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 28px;
}

.fundraisers-container .fundraiser-main-image {
    border-radius: 12px;
}

/* ── Layout spacing ── */
.fundraisers-container .fundraisers-layout {
    gap: 40px;
    padding: 20px 0;
}

/* ── Widget sticky on desktop ── */
@media (min-width: 901px) {
    .fundraisers-container .fundraisers-layout-right {
        position: sticky;
        top: 24px;
        align-self: flex-start;
    }
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .fundraisers-container .fundraiser-main-title {
        font-size: 1.5rem;
    }

    .fundraisers-container .single-description h1 {
        font-size: 1.4rem;
    }

    .fundraisers-container .single-description h2 {
        font-size: 1.2rem;
    }

    .fundraisers-container .progress-amount {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .fundraisers-container {
        padding: 12px;
    }

    .fundraisers-container .single-description {
        font-size: 0.95rem;
    }

    .fundraisers-container .person-details {
        padding: 16px;
    }

    .fundraisers-container .donation-side-info {
        padding: 16px;
    }

    .fundraisers-container .payment-methods {
        gap: 12px;
    }

    .fundraisers-container .payment-methods .payment-logo {
        height: 22px;
    }
}

/* ── Fundraiser card — "Wesprzyj" button on each card ──
   Cały .fundraiser-card jest zawinięty w <a class="fundraiser-link">, więc
   wizualny przycisk dodajemy przez ::after na .fundraiser-card-content.
   Kliknięcie dalej działa na całym cardzie — nie potrzeba dodatkowego <a>. */

.fundraisers-container .fundraiser-card {
    display: flex;
    flex-direction: column;
}

.fundraisers-container .fundraiser-link {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    text-decoration: none;
    color: inherit;
}

.fundraisers-container .fundraiser-card-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.fundraisers-container .fundraiser-card-content::after {
    content: 'Wesprzyj film';
    display: block;
    margin-top: 20px;
    padding: 14px 24px;
    background: #ef9127;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.fundraisers-container .fundraiser-card:hover .fundraiser-card-content::after {
    background: #d97808;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 145, 39, 0.3);
}

/* ── Zakończona zbiórka — single page ───────────────────────────────────── */

.fundraisers-container.fundraiser-ended .fundraiser-urgent-tag {
    background: #6c757d;
    color: #ffffff;
}

.fundraisers-container.fundraiser-ended .fundraiser-main-image {
    filter: grayscale(20%);
}

.donation-widget.donation-widget--ended {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.donation-widget--ended .ended-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    background: #057793;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 999px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.donation-widget--ended .ended-badge svg {
    flex-shrink: 0;
}

.donation-widget--ended .ended-summary-text {
    color: #4a5568;
    font-size: 15px;
    line-height: 1.55;
}

.donation-widget--ended .ended-summary-text p {
    margin: 0 0 8px;
}

.donation-widget--ended .ended-summary-text p:last-child {
    margin-bottom: 0;
}

.donation-widget--ended .ended-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f5fafc;
    border-radius: 10px;
    padding: 16px 18px;
}

.donation-widget--ended .ended-stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.donation-widget--ended .ended-stat-label {
    color: #6c757d;
    font-size: 14px;
}

.donation-widget--ended .ended-stat-value {
    color: #1a202c;
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
}

.donation-widget--ended .ended-stat--primary {
    border-bottom: 1px solid #d8eaf0;
    padding-bottom: 10px;
}

.donation-widget--ended .ended-stat--primary .ended-stat-value {
    color: #057793;
    font-size: 22px;
}

.donation-widget--ended .ended-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.donation-widget--ended .ended-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.donation-widget--ended .ended-btn--primary {
    background: #057793;
    color: #ffffff;
}

.donation-widget--ended .ended-btn--primary:hover {
    background: #045f76;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 119, 147, 0.25);
    color: #ffffff;
}

.donation-widget--ended .ended-btn--secondary {
    background: #c5e9ef;
    color: #057793;
}

.donation-widget--ended .ended-btn--secondary:hover {
    background: #057793;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 119, 147, 0.25);
}

.donation-widget--ended .ended-side-info {
    border-top: 1px solid #e2e8f0;
    padding-top: 18px;
}

.donation-widget--ended .ended-side-info .side-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a202c;
}

.donation-widget--ended .ended-side-info .side-description {
    color: #4a5568;
    font-size: 14px;
    line-height: 1.55;
}

/* ── Donation form: bigger bank logos ── */
.fundraisers-container .payment-method {
    height: auto;
    min-height: 96px;
    padding: 16px;
}

.fundraisers-container .payment-method img {
    height: 56px;
}

@media (max-width: 600px) {
    .fundraisers-container .payment-method {
        min-height: 80px;
        padding: 12px;
    }

    .fundraisers-container .payment-method img {
        height: 44px;
    }
}