@import '../colors';

.topbar {
    position: fixed;
    top: 0;
    z-index: 999;
    display: block;
    width: 100%;

    .close-article-button {
        width: 40px;
        height: 40px;
        display: flex;
        margin-left: auto;
        margin-top: 15px;
        margin-right: 15px;
        align-items: center;
        justify-content: center;
        background-color: rgba(#ffff, 0.5);
        border-radius: 50%;
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.3s, transform 0.3s;
    
        &.active {
            animation: fadeInFromBottom 0.5s forwards;
        }    
    
        ion-icon {
            color: white;
            font-size: 20px;
        }
    }
}

@keyframes fadeInFromBottom {
    0% {
        opacity: 0;
        transform: translateY(30px);
    } 
    
    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}

.image-holder {
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    height: 40%;
    overflow: hidden;

    .video-embed {
        position: relative;
        z-index: 0;
    }

    h4 {
        pointer-events: none;
        font-size: 1.5rem;
        margin: 0px;
        line-height: 1.5;
        font-weight: 500;
        transition: opacity 0.1s;
        padding: 10px 0;
        position: absolute;
        color: white;
        bottom: 55px;
        left: 4%;
        width: 70%;
        animation: fadeInFromBottom 0.5s forwards;
    }

    button {
        width: 60px;
        height: 60px;
        position: absolute;
        top: calc(50% - 60px);
        left: calc(50% - 30px);
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: rgba(var(--brand-red-rgb), 0.5);
        border-radius: 50%;
        animation: popin 0.3s forwards;
        animation-delay: 0.5s;
        transform: scale(0);

        @keyframes popin {
            0% {
                transform: scale(0);
            }

            50% {
                transform: scale(1.4);
            }

            100% {
                transform: scale(1);
            }
        }

        ion-icon {
            color: white;
            font-size: 20px;
            transition: color 0.3s;
        }
    }

    figure {
        margin: 0;
        display: block;
        width: 100%;
        height: 100%;
        filter: brightness(30%);

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

.content {
    background-color: white;
    padding: 5%;
    margin: 0 auto;
    border-radius: 0px;
    transition: border-radius 0.3s, transform 0.3s, width 0.3s, margin 0.3s, box-shadow 0.3s;
    border-bottom: 1px solid rgba(var(--light-grey-rgb), 0.3);
    z-index: 2;
    width: 90%;
    height: auto;
    position: relative;
    border-radius: 10px;
    overflow: auto;
    border-width: 0px;
    box-shadow: 0px 0px 15px rgba(var(--light-grey-rgb), 0.3);
    animation: showUpContent 0.5s forwards;

    figure {
        border-radius: 10px;
        overflow: hidden;
        margin-bottom: 20px;
        display: block;

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

@keyframes showUpContent {
    0% {
        transform: translateY(0px);
    }
    100% {
        transform: translateY(-40px);
    }
}

.details {
    margin: 0px;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 400;
    color: var(--light-grey);
    overflow: hidden;
    transition: opacity 0.1s;
    
    p {
        margin-bottom: 20px;
    }
}

.share-button {
    --background: transparent;
    border-radius: 50%;
    background-color: $green;
    --color: white;
    transform: translate(10px, -10px);
}