.ActionDetails__inner {
    display: grid;
}

.ActionDetails__inner * {
    z-index: 20;
}

.ActionDetails__coverWrapper {
    position: relative;
    height: clamp(10rem, 30vw, 25rem);
    background-color: var(--primaryColor200);
    border-radius: var(--borderRadiusSmall);
    overflow: clip;
}

.ActionDetails__coverWrapper::after {
    position: absolute;
    inset: 0;
    content:'';
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
    z-index: 10;
}

.ActionDetails__cover {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/**
 * Campaigner
 */

.ActionDetails__imageWrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 8rem;
    height: 8rem;
    margin: -4rem auto 0;
    border-radius: 100%;
    overflow: clip;
    background-color: var(--baseLight100);
    border: 4px solid var(--baseLight100);
    box-shadow: var(--boxShadowSmall);
}

.ActionDetails__profilePicture:not(.--fallback) {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ActionDetails__profilePicture.--fallback {
    font-size: var(--h1Size);
    color: var(--primaryColor500);
}

.ActionDetails__profilePicture.--fallback::before {
    margin: 0;
}

.ActionDetails__titleWrapper {
    margin-top: var(--marginSmall);
    text-align: center;
}

.ActionDetails__title {
    display: block;
    margin-bottom: 0;
}

.ActionDetails__titleWrapper:not(:has(.ActionDetails__title)) .ActionDetails__campaignerName {
    font-size: var(--h2Size);
}

.ActionDetails__motivation {
    margin-top: var(--marginMedium);
}

.ActionDetails__motivation ul {
    margin: var(--marginExtraSmall) 0 0 0;
    padding-left: var(--marginSmall);
}

/**
 * Donation thermometer
 */

@media (max-width: 799px) {
    .ActionDetails__donateWrapper {
        top: 0 !important;
    }
}

.ActionDetails__donateWrapper {
    max-width: 20rem;
    width: 100%;
    margin: var(--marginMedium) auto 0;
    padding: var(--marginSmallMedium);
    background-color: var(--baseLight100);
    border-radius: var(--borderRadiusSmall);
    box-shadow: var(--boxShadow);
    overflow: clip;
}

.ActionDetails__donateTitle {
    margin-bottom: var(--marginSmall);
}

.ActionDetails__amount {
    font-size: var(--h3Size);
}

.ActionDetails__target {
    font-size: var(--preTitleSize);
}

.ActionDetails__thermometer {
    display: block;
    margin-block: var(--marginExtraSmall) .2rem;
    color: var(--secondaryColor500);
    background: var(--baseLight300);
}

.ActionDetails__thermometer,
.ActionDetails__thermometerFluid {
    border-radius: var(--borderRadiusSmall);
}

.ActionDetails__thermometerFluid {
    display: block;
    max-width: 100%;
    border: solid .5rem;
}

.ActionDetails__thermometerFluid[style*=' 0%'] {
    visibility: hidden;
}

.ActionDetails__link {
    width: 100%;
    justify-content: center;
    margin: var(--marginSmallMedium) 0 0 0;
}

@media (min-width: 800px) {
    .ActionDetails__inner {
        position: relative;
        width: 100%;
        grid-template-columns: clamp(0.5rem, 3vw, 4rem) max-content 1fr 20rem clamp(0.5rem, 3vw, 4rem);
        grid-template-rows: 1fr 5rem 5rem auto;
        column-gap: var(--marginSmall);
    }

    .ActionDetails__coverWrapper {
        grid-column: 1 / -1;
        grid-row: 1 / 3;
    }

    .ActionDetails__imageWrapper {
        grid-row: 2 / -1;
        grid-column: 2;
        margin: 0;
        width: 10rem;
        height: 10rem;
    }

    .ActionDetails__titleWrapper {
        margin-top: 0;
        grid-row: 2;
        grid-column: 3;
        align-self: self-end;
        margin-bottom: var(--marginSmall);
        text-align: left;
        hyphens: auto;
    }

    .ActionDetails__donateWrapper {
        position: sticky;
        top: var(--marginMedium); /* value changes by JS when header is fixed */
        align-self: flex-start;
        grid-column: 4;
        grid-row: 2 / -1;
        margin: 0;
    }

    .ActionDetails__motivation {
        grid-column: 2 / 4;
        grid-row: 4;
        margin: var(--marginMedium) var(--marginMedium) 0 0;
    }

    .ActionDetails__title,
    .ActionDetails__campaignerName {
        color: var(--baseLight100) !important;
    }
}

