
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;700&display=swap');

* {
    box-sizing: border-box;
}

:root {
    --veryDarkBlue: hsl(217, 19%, 35%);
    --darkBlue: hsl(214, 17%, 51%);
    --grayishBlue: hsl(212, 23%, 69%);
    --lightGrayishBlue: hsl(210, 46%, 95%);
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;

    font-family: 'Manrope', arial;
    font-size: 13px;
    font-weight: 500;

    background-color: var(--lightGrayishBlue);
}

.attribution { 
    text-align: center; 
}
    
.attribution a { 
    color: hsl(228, 45%, 44%); 
}

.main {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 730px;
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
    
    border-radius: 10px;
    box-shadow: 5px 5px 20px rgba(0,0,0,0.1);
}

.left, .right {
    height: 280px;
}

.left {
    width: 300px;
}

.left img {
    width: 350px;
    border-radius: 10px 0 0 10px;
}

.right {
    padding: 30px;
    background-color: #FFFFFF;
    border-radius: 0 10px 10px 0;
    position: relative;
}

.bold-text {
    font-weight: 700;
    color: var(--veryDarkBlue);
}

.light-text {
    color: var(--grayishBlue);
}

h1 {
    font-size: 20px;
    margin-top: 0;
}

p {
    color: var(--darkBlue);
    line-height: 20px;
}

.content-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.author-cont {
    display: flex;
    align-items: center;
}

.author-avatar {
    margin-right: 10px;
}

.author-avatar img {
    width: 40px;
    border-radius: 50%;
}

.author-name div {
    margin: 2px 0;
}

.share-text {
    color: var(--grayishBlue);
    letter-spacing: 6px;
}

#shareButton {
    outline: none;
    border: none;
    margin: 0 10px;
    border-radius: 50%;
    background-color: var(--lightGrayishBlue);
    width: 30px;
    height: 30px;
    
    z-index: 2;
    position: relative;
    transform: scale(1);
}

#shareButton:hover {
    opacity: 0.8;
}

#shareButton:active { 
    transform: scale(0.8);
}

#shareButton i {
    color: var(--darkBlue);
    font-size: 16px;
    padding: 2px;
}

.share-options {
    visibility: hidden;
    opacity: 0;

    width: 250px;
    padding: 13px 30px;

    display: flex;
    justify-content: space-around;
    align-items: center;

    background-color: var(--veryDarkBlue);
    border-radius: 10px;
    box-shadow: 5px 5px 20px rgba(0,0,0,0.2);

    position: absolute;
    left: 250px;
    bottom: 90px;
}

.share-options::after {
    content: "";
    position: absolute;
    top: 50px;
    border: 12px solid transparent;
    border-top-color: var(--veryDarkBlue);
}

.share-cont.active .share-options {
    visibility: visible;
    opacity: 1;
    animation: slideIn 0.5s linear;
}

@keyframes slideIn {
    0% { bottom: 80px; opacity: 0; }
    100% { bottom: 90px; opacity: 1; }
}

.share-cont.active #shareButton {
    background-color: var(--darkBlue);
}

.share-cont.active #shareButton i {
    color: #FFFFFF;
}


@media only screen and (max-width: 880px) {
    .container {
        width: 350px;
        flex-direction: column;
    }

    .left {
        width: 350px;
        height: 230px;
    }

    .left img {
        border-radius: 10px 10px 0 0;
    }

    .right {
        height: auto;
        border-radius: 0 0 10px 10px;
        padding-bottom: 20px;
    }

    h1 {
        font-size: 18px;
    }

    .content-bottom {
        margin-top: 40px;
    }

    .share-cont.active .share-options {
        bottom: 0;
        left: 0;
        width: 350px;
        height: 80px;
        border-radius: 0 0 10px 10px;
        padding-right: 120px;
        z-index: 1;

        animation: slideUp 0.5s linear;
    }

    .share-cont.active .share-options::after {
        display: none;
    }

    @keyframes slideUp {
        0% { bottom: -10px; height: 0; opacity: 0; }
        100% { bottom: 0; height: 80px; opacity: 1; }
    }
}
