/***
=============================================
    Story comments
    The list and the form on the story details page. Accent colours come
    from the .thm-clr / .thm-bg-clr classes in the markup so the colour
    themes keep working; nothing here hard-codes the brand colour.
=============================================
***/
.story-comments {
    padding-top: 50px;
    padding-bottom: 20px;
}

.story-comment {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px 0;
    border-bottom: 1px solid #f0f0f0;
}

.story-comment:first-of-type {
    padding-top: 0;
}

.story-comment:last-of-type {
    border-bottom: none;
}

.story-comment__avatar {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 52px;
    text-align: center;
}

.story-comment__body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 16px 20px;
    background: #f9f9f9;
    border-radius: 6px;
}

.story-comment__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin-bottom: 8px;
}

.story-comment__author {
    margin: 0;
    color: #222222;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
}

.story-comment__meta time {
    color: #9a9a9a;
    font-size: 13px;
}

.story-comment__text p {
    margin: 0;
    overflow-wrap: anywhere;
}

.story-comments__empty {
    padding: 30px 20px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 6px;
}

.story-comments__empty i {
    display: block;
    margin-bottom: 10px;
    font-size: 32px;
}

.story-comments__empty p {
    margin: 0;
}

/* Form */
.story-comment-form {
    margin-top: 20px;
    padding: 40px 35px 35px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
}

.story-comment-form__intro {
    margin: -10px 0 25px;
    color: #848484;
    font-size: 14px;
}

.story-comment-form__alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    padding: 14px 18px;
    border-radius: 4px;
    font-size: 15px;
}

.story-comment-form__alert--success {
    color: #1e6b34;
    background: #e9f7ee;
    border: 1px solid #bfe5cb;
}

.story-comment-form__alert--error {
    color: #a12a2a;
    background: #fcecec;
    border: 1px solid #f2c4c4;
}

.story-comment-form__field {
    margin-bottom: 22px;
}

.story-comment-form__field label {
    display: block;
    margin-bottom: 6px;
    color: #222222;
    font-size: 14px;
    font-weight: 600;
}

.story-comment-form__field input,
.story-comment-form__field textarea {
    display: block;
    width: 100%;
    padding: 12px 15px;
    color: #222222;
    font-size: 15px;
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.story-comment-form__field input {
    height: 50px;
}

.story-comment-form__field textarea {
    min-height: 150px;
    resize: vertical;
}

.story-comment-form__field input:focus,
.story-comment-form__field textarea:focus {
    outline: none;
    border-color: #9a9a9a;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.story-comment-form__field.has-error input,
.story-comment-form__field.has-error textarea {
    border-color: #d64545;
}

.story-comment-form__error {
    display: block;
    margin-top: 6px;
    color: #d64545;
    font-size: 13px;
}

.story-comment-form__hint {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.story-comment-form__hint .story-comment-form__error {
    margin-top: 6px;
}

.story-comment-form__count {
    margin-top: 6px;
    margin-left: auto;
    color: #9a9a9a;
    font-size: 12px;
    white-space: nowrap;
}

.story-comment-form__honeypot {
    position: absolute;
    left: -9999px;
}

@media only screen and (max-width: 767px) {
    .story-comment {
        gap: 12px;
    }

    .story-comment__avatar {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
        font-size: 16px;
        line-height: 40px;
    }

    .story-comment__body {
        padding: 14px 16px;
    }

    .story-comment-form {
        padding: 30px 18px 22px;
    }
}
