/*
Comments
============================================= */
#comments {
    margin-bottom: 4.375em;
    margin-top: 4.375em;
    max-width: 45%;
    margin-left: auto;
    margin-right: auto;

    .comments-title {
        color: $gray-800;
        font-size: 1.375rem;

        .refru-dark-background & {
            color: $gray-500;
        }
    }
}

.comment-list {
    margin-left: 0;
    margin-top: 1.875em;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);

    .refru-dark-background & {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .comment {
        list-style-type: none;
        -moz-osx-font-smoothing: grayscale;
        -webkit-font-smoothing: antialiased;

        .comment-body {
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
            padding: 2.5rem 0;
            font-size: 14px;
            display: flex;
            flex-wrap: wrap;
            position: relative;

            .refru-dark-background & {
                border-top: 1px solid rgba(255, 255, 255, 0.1);
            }

            .comment-content {
                flex-basis: 100%;
                display: inline-block;
                vertical-align: top;
                color: $gray-700;

                .refru-dark-background & {
                    color: $gray-400;
                }
            }

            .comment-meta {
                flex-basis: 100%;
                display: inline-block;
                margin-bottom: 15px;
                display: flex;
                align-items: center;

                .comment-author {
                    flex-basis: 50%;

                    img {
                        border-radius: 50px;
                        width: 32px;
                        height: 32px;
                        margin-right: 15px;
                    }

                    .fn {
                        color: $gray-800;

                        .refru-dark-background & {
                            color: $gray-500;
                        }
                    }

                    .says {
                        display: none;
                    }
                }

                .comment-metadata {
                    font-size: 11px;
                    flex-basis: 50%;
                    text-align: right;

                    a {
                        color: $gray-500;
                        display: block;

                        .refru-dark-background & {
                            color: $gray-600;
                        }
                    }

                    .edit-link {
                        display: block;
                    }
                }
            }

            .reply {
                flex-basis: 100%;
                text-align: right;
                position: absolute;
                bottom: 15px;
                width: 100%;

                .comment-reply-link {
                    padding: 5px;
                    font-size: 13px;
                    color: $gray-500;
                    text-decoration: none;
                    position: relative;
                    padding-left: 20px;

                    .refru-dark-background & {
                        color: $gray-600;
                    }

                    .no-touchevents &:hover {
                        color: $gray-700;

                        .refru-dark-background#{&} {
                            color: $gray-400;
                        }
                    }

                    &::before {
                        @include fa-icon;
                        @extend .far;
                        content: fa-content($fa-var-comments);
                        position: absolute;
                        top: 50%;
                        left: 0;
                        transform: translateY(-50%);
                        font-size: 14px;
                    }
                }
            }
        }

        &.bypostauthor .comment-body {
            color: $gray-700;
            border-bottom-color: $primary;

            .refru-dark-background & {
                color: $gray-300;
            }
        }
    }

    .pingback .comment-body {
        margin-bottom: 15px;

        .edit-link a {
            font-size: 14px;
            color: $gray-400;
            text-decoration: underline;

            &:hover {
                text-decoration: none;
            }
        }
    }
}
/*
Comments - Extra Small
-------------------------------------------- */
@include media-breakpoint-only(xs) {
    #comments {
        min-width: 85%;
    }
}

/*
Comments Form
============================================= */
#respond {
    margin: 5rem 0;

    .comment-reply-title {
        color: $gray-800;
        font-size: 1.375rem;

        .refru-dark-background & {
            color: $gray-500;
        }
    }
}

.comment-form {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    justify-content: space-between;

    .input-wrap {
        flex-basis: 100%;

        &.textarea {
            flex-basis: 100%;
            margin-left: 0;
            margin-right: 0;
        }

        .control-label {
            font-size: 13px;
            font-weight: bold;
            text-transform: uppercase;
            color: $gray-700;
        }

        .controls-wrap {
            position: relative;

            input {
                padding-left: 42px;
                width: 100%;

                &:focus {
                    outline: none;
                }
            }

            textarea {
                width: 100%;
                height: 150px;
                margin-bottom: 1.42857142857143em;
                padding: 10px 20px;

                &:focus {
                    outline: none;
                }
            }

            i {
                position: absolute;
                left: 15px;
                top: 50%;
                transform: translate(0, -50%);
                color: $gray-400;
                font-size: 16px;
            }
        }
    }

    .comment-form-cookies-consent {
        display: flex;
        align-items: center;
        margin-top: 10px;
        color: $gray-600;
        font-size: 0.875rem;

        #wp-comment-cookies-consent {
            display: inline-block;
            width: auto;
            height: auto;
            margin-bottom: 0;
            margin-right: 10px;
        }

        label {
            margin-bottom: 0;
        }
    }

    .form-submit {
        margin-top: 20px;

        input[type="submit"] {
            @extend .refru-button;
            height: auto;
        }
    }
}

// Small and up
@include media-breakpoint-up(sm) {
    /* Comment List										
    /*-------------------*/
    .comment-list {
        .comment {
            .comment-body {
                .comment-content {
                    flex-basis: 75%;
                }

                .comment-meta {
                    flex-basis: 20%;
                    margin-right: 5%;
                    margin-bottom: 0;
                    flex-wrap: wrap;

                    .comment-author {
                        flex-basis: 100%;
                    }

                    .comment-metadata {
                        flex-basis: 100%;
                        text-align: left;
                        margin-top: 10px;

                        a {
                            color: $gray-500;
                            display: block;
                        }

                        .edit-link {
                            display: block;
                        }
                    }
                }

                .comment-metadata {
                    .edit-link {
                        display: block;
                    }
                }
            }
        }
    }

    /* Comment Form													
    /*-------------------*/
    .comment-form {
        .input-wrap {
            flex-basis: 30%;
        }
    }
}
