*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'system-ui';
}

body{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f6fa;
    color: #6d7075;
    padding: 0 20px;
    /* overflow: hidden; */
}

.hidden{
    display: none !important;
}

.comments-container{
    margin: 20px 0;
}

@media screen and (min-width: 768px) {
    .comments-container{
        width: 50%;
    }
}

.comments-list{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background-color: #fff;
    border-radius: 10px;
    justify-content: space-between;
    gap: 20px;
    padding: 10px;
    margin-bottom: 10px;
}

.comment header{
    order: -1;
}

.comment-edit-placeholder,
.comment .comment-content{
    order: -1;
    grid-column: span 2;
}

.comment-content{
    width: 100%;
}

.comment img{
    width: 30px;
}

.comment header{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

.comment-name{
    color: #2c333c;
    font-weight: 600;
}

.you-stamp{
    background-color: #5358b4;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0 5px 5px;
    border-radius: 2px;
}

.comment-score{
    display: flex;
    flex-direction: row;
    background-color: #f4f6fb;
    align-items: center;
    width: fit-content;
    padding: 10px;
    gap: 20px;
    border-radius: 10px;
    color: #5358b4;
    font-weight: bold;
}

.comment-score button{
    border: none;
    background: none;
    height: fit-content;
    cursor: pointer;
    display: flex;
}

.comment-buttons-container{
    display: flex;
}

.comment-button{
    padding: 10px;
    width: fit-content;
    color: #5358b4;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: filter 0.2s;
}

.comment-button:hover{
    filter: brightness(2);
}

#delete-btn{
    color: #ed6368;
}

.replies-list{
    position: relative;
    margin-left: 20px;
}

.replying-to{
    color: #5358b4;
    font-weight: bold;
}
.replies-list::before{
    content: '';
    position: absolute;
    height: 100%;
    width: 2px;
    background-color: #ecedf1;
    left: -20px;
}

@media screen and (min-width: 768px) {
    .comment{
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: flex-start;
        padding: 20px;
        row-gap: 0;
    }

    .comment header{
        order: 0;
    }

    .comment-edit-placeholder,
    .comment .comment-content{
        order: 1;
    }

    .comment-score{
        flex-direction: column;
        grid-row: span 2;
    }

    .replies-list{
        margin-left: 80px;
    }
    .replies-list::before{
        left: -40px;
    }
}

.comment-edit-placeholder,
.reply-container,
.add-comment-container{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.comment-edit-placeholder{
    justify-content: flex-end;
    padding: 0;
}

.comment-edit-placeholder textarea,
.reply-container textarea,
.add-comment-container textarea{
    color: #6d7075;
    resize: none;
    overflow: hidden;
    width: 100%;
    height: 70px;
    padding: 10px;
    order: -1;
    border-color: #ebebeb;
    border-radius: 10px;
}

@media screen and (min-width: 768px) {
    .reply-container,
    .add-comment-container{
        flex-wrap: nowrap;
        align-items: flex-start;
    }
    .comment-edit-placeholder textarea,
    .reply-container textarea,
    .add-comment-container textarea{
        /* font-size: 15px; */
        order: 0;
    }
    
    .comment-edit-placeholder textarea{
        height: 100px;
    }
}

.reply-container img,
.add-comment-container img{
    width: 30px;
    height: 30px;
}

#comment-reply-btn,
#comment-edit-btn,
#send-comment-btn{
    padding: 10px 20px;
    font-size: 1.2rem;
    color: white;
    text-transform: uppercase;
    font-weight: bold;
    background-color: #5358b4;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: filter 0.2s;
}

#comment-reply-btn:hover,
#comment-edit-btn:hover,
#send-comment-btn:hover{
    filter: brightness(2);
}

@media screen and (min-width: 768px) {
    #comment-reply-btn,
    #comment-edit-btn,
    #send-comment-btn{
        font-size: .9rem;
    }
}

.delete-confirm-container{
    position: fixed;
    background-color: rgba(0, 0, 0, 0.3);
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;

    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
}

.delete-confirm{
    background-color: white;
    border-radius: 20px;
    width: 330px;
    padding: 30px;
}
.delete-confirm h1{
    color: #2c333c;
    margin-bottom: 20px;
}

.delete-confirm .buttons-container{
    display: flex;
    gap: 20px;
    margin-top: 20px;
}
.delete-confirm .buttons-container button{
    flex: 1;
    font-size: 15px;
    text-transform: uppercase;
    font-weight: bold;
    color: white;
    background-color: #68727e;
    border: none;
    padding: 15px 15px;
    border-radius: 10px;
}

#delete-confirm-btn{
    background-color: #ed6368;
}

footer{
    width: 100%;
}

.attribution { font-size: 11px; text-align: center; margin: 10px 0;}
.attribution a { color: hsl(228, 45%, 44%); }