﻿
/*new event styles for the revamp*/

.event-profile-picture-default {
    position: relative;
    width: 100px;
    height: 100px;
    color: #6c757d;
    background-color: #f8f9fa;
    font-size: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 0.25rem;
}


.ev-cover-image {
    width: 100%;
    height: 100%;
    max-height: 298px; /*-2px for border on ev-cover*/
    object-fit: cover;
    grid-area: coverimage;
}

.ev-cover-image.ev-cover-image-too-short {
    object-fit: contain;
}


.ev-justgiving .ev-cover-image {
    object-fit: contain; /*mirrors how images are displayed on JG*/
}


.ev-cover {
    border: 1px solid rgba(0,0,0,0.25);
    background-color: #f8f9fa;
    height: auto;
    text-align: center;
    grid-area: cover;
    position: relative;
    min-height: 150px;
}


.ev-cover.ev-cover-hasnoimage {
     height: 1px; /*needed so child with height:100% fills .ev-cover*/
}

.ev-has-livestream .ev-cover {
    border: 0;
    background-color: transparent;
    border-left: none;
}

.ev-has-livestream .ev-cover-donate {
    border-left: 1px solid rgba(0,0,0,0.25);
}

.btn-gallery {
    position: absolute;
    top: 20px;
    right: 20px;
}

.ev-update {
    border-top: 1px solid #dee2e6;
    margin-bottom: 4rem;
    padding-top: 1.5rem;
}

.ev-update:first-child {
    border-top: none;
    padding-top: 0;
}

.ev-update-images {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ev-update-images .btn-gallery {
    position: absolute;
    bottom: 20px;
    top: unset;
    right: unset;
    left: calc(50% - 21.5px);
}


.ev-details {
    grid-area: details;
}

.ev-cover-donate {
    grid-area: donate;
    display: none;
}


.ev-updates {
    grid-area: updates;
}

.ev-recent-donations {
    grid-area: donations;
}

.ev-cover-donate,
.ev-updates,
.ev-recent-donations,
.ev-details {
    padding: 30px 0;
}

.ev-donations-summary .ev-details {
    padding-top: 0;
    margin-top: 0;
}

.ev-avatar {
    grid-area: ev-avatar;
    position: relative;
}

.ev-title {
    padding-top: 1.5rem;
    grid-area: ev-title;
}

.ev-story {
    grid-area: ev-story;
}

.ev-avatar {
    text-align: center;
}

.ev-avatar img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 0.25rem;
}


.ev-update-image {
    display: block;
    text-align: center;
}

.ev-update-image img {
    height: auto;
    width: auto;
    max-height: 400px;
    max-width: 100%
}



.no-focus-outline {
    outline: none !important;
}



.ev-donation-partner {
    grid-area: ev-donation-partner;
    margin-top: 1.5rem;
    text-align: center;
}

.ev-createdby {
    grid-area: ev-createdby;
}

.ev-donations-target {
    grid-area: ev-donations-target;
}

.ev-donate-button {
    grid-area: ev-donate-button;
}



.ev-partnerlogo {
    max-width: 160px;
}


.ev-story {
    padding-top: 1.5rem;
}


.donation-summary-table tr > td:last-child {
    text-align: right;
}

.ev-creator {
    grid-area: ev-creator;
    display: grid;
    -ms-grid-rows: auto;
    grid-template-rows: auto;
    -ms-grid-columns: 100px 30px auto;
    grid-template-columns: 100px 30px auto;
    grid-template-areas: "ev-avatar . ev-createdby"
}


.tribute-events-grid {
    display: flex;
    flex-direction: column;
}

.tribute-events-grid-item {
    position:relative;
    display: flex;
    flex-grow: 1;
    flex-direction: row;
    position: relative;
    height: auto;
    border: none;
    border-radius: 0.2rem;
    overflow: hidden;
    border: 1px solid #ddd;
    background-color: #fff;
    margin: 15px 0 15px 0;
}

.tribute-events-grid-item-link {
    width: 100%;
    display: flex;
    flex-grow: 1;
    flex-direction: row;
}



    .tribute-events-grid-item-link:hover {
        background-color: #f5f5f5;
    }

/*need to absolutely position donate link as we can't nest a tags*/
a.tribute-events-grid-item-donate-button {
    position: absolute;
    display:none;
    width: auto;
    bottom: 15px;
    right: 15px;
}
.tribute-events-grid-item-donate-button-fake {
    display: none;
}

.tribute-events-grid-item-img-wrapper-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.tribute-events-grid-item-img-wrapper {
    height: 200px;
    box-sizing: content-box; /*ensures right border is visible*/
}

.tribute-events-grid-item-img-wrapper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}


/*img is smaller than the wrapper in at least one dimension, so show all of it*/
.tribute-events-grid-item-img-wrapper img.img-is-small {
    object-fit: contain;
}
.tribute-events-grid-item-img-wrapper img.img-is-logo {
        object-fit: none;
}

.tribute-events-grid-item-body {
    width: 100%;
    min-width: 0; /*need this on the flex-child to ensure text-truncate works https://css-tricks.com/flexbox-truncated-text/ */
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}


.tribute-events-grid-item-title {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}



@media (min-width: 576px) {

    /*once screen is >  576px we make the img square and align it on the left of the event listing */

    .tribute-events-grid-item-img-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        border-right: 1px solid #ddd;
        width: 150px;
        height: 150px;
        background-color: #fff;
        background-size: 0 0; /*will be cover if browser supports backdrop-filter*/
    }

    .tribute-events-grid-item-img-wrapper-inner {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }

    .tribute-events-grid-item-img-wrapper img {
        height: 150px;
        width: 150px;
        object-fit: cover;
    }


    .tribute-events-grid-small .tribute-events-grid-item-img-wrapper img,
    .tribute-events-grid-small .tribute-events-grid-item-img-wrapper {
        width: 100px;
        height: 100px;
    }

    /*only show donate button on larger screens*/
    a.tribute-events-grid-item-donate-button,
    .tribute-events-grid-item-donate-button-fake {
        display: inline-block;
    }

    .tribute-events-grid-item-img-wrapper img.img-is-logo {
        object-fit: contain;
    }
}



/* backdrop-filter will not work on IE11*/
@supports(  backdrop-filter: blur(30px)) {

    .tribute-events-grid-item-img-wrapper {
        background-size: cover;
    }

    .tribute-events-grid-item-img-wrapper-inner {
        backdrop-filter: blur(30px);
    }
}


/*calendar & person icons are diff widths, this is a way of making the subsequent text line up vertically*/
.tribute-events-grid-item-icon {
    width: 20px;
    display: inline-block;
}



@media screen and (min-width: 992px) {
    .ev-container {
        display: grid;
        -ms-grid-columns: 2fr 15px 1fr;
        grid-template-columns: 2fr 15px 1fr;
        -ms-grid-rows: auto auto auto auto auto auto auto;
        grid-template-rows: auto auto auto auto auto auto auto;
        grid-template-areas: "cover donate donate" "ev-title ev-title ev-title" "ev-creator ev-donation-partner ev-donation-partner" ". ev-donations-target ev-donations-target" ". ev-donate-button ev-donate-button" "ev-story ev-story ev-story" "updates updates updates" "donations donations donations"
    }

        .ev-container.notfundraising {
            grid-template-areas: "cover cover ." "ev-title ev-title ev-title" "ev-creator ev-creator ev-creator" "ev-story ev-story ev-story" "updates updates updates"
        }




    .ev-donation-partner {
        margin-top:0;
    }

    .ev-donations-target,
    .ev-donate-button {
        display: none;
    }

    .ev-hasnocoverimage:not(.ev-has-livestream) .ev-donations-target,
    .ev-hasnocoverimage:not(.ev-has-livestream) .ev-donate-button {
        display: block;
    }

    .ev-creator {
        -ms-grid-columns: 100px 30px auto ;
        grid-template-columns: 100px 30px auto ;
        grid-template-areas: " ev-avatar . ev-createdby "
    }


    .ev-avatar img {
        border: none;
    }

    .ev-cover-donate {
        padding: 20px 15px 20px 15px;
        border-top: 1px solid rgba(0,0,0,0.25);
        border-right: 1px solid rgba(0,0,0,0.25);
        border-bottom: 1px solid rgba(0,0,0,0.25);
        display: block;
    }

   
    .ev-cover,
    .ev-cover.ev-cover-hasnoimage {
        height: 300px;
    }

   
}

.ev-hasnocoverimage:not(.ev-has-livestream) .ev-cover,
.ev-hasnocoverimage:not(.ev-has-livestream) .ev-cover-donate {
    display: none;
}

