#article-comments-section .btn:focus {
    outline: unset;
}

#article-comments-section .btn {
    font-size: 1em;
}

#article-comments-thread {
    padding-top: 0.5em;
    padding-bottom: 1.2em;
}

#article-comments-wrapper {
    font-size: inherit;
}

.direct-comment {
    position: relative;
}

.child-comments {
    margin-left: 5px;
    padding-left: min(8vw, 2.8em);
}

.article-comment:target > .comment-wrapper {
    border-top-right-radius: 4px;
    border-top-left-radius: 4px;
    box-shadow: 0px 0px 5px 0px var(--comment-color-primary);
}

.article-comment:target > .comment-wrapper .comment-header {
    background-color: var(--comment-target-header-background-color);
}

.light-btn:hover, .light-btn:focus {
    background-color: #e2e6ea;
    border: 1px solid #dae0e5;
}

.child-comment {
   position: relative;
}

.child-comment:before {
    font-family: FontAwesome;
    content: "\f112";
    color: var(--comment-color-primary);
    font-weight: 900;
    display: inline-block;
    position: absolute;
    left: -2em;
    transform: rotate(180deg);
    top: 10px;
}

.comment-wrapper {
    border-radius: 2px;
    margin-bottom: 1.1em;
    box-shadow: 0px 0px 5px 0px #c9c9c9;
}

.comment-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 0.6em;
    border-radius: 2px;
    background-color: var(--comment-header-background-color);
}

.comment-body {
    padding: 5px;
    border-radius: 2px;
    max-height: min(300px, 50vh);
    overflow: hidden;
    /* This is REQUIRED to compute the overlay background color; */
    background-color: #fff;
}

.comment-body-wrapper {
    position: relative;
    padding: 0.8em;
}

.comment-body > p:last-child {
    margin-bottom: 0px;
}

.comment-header-metadata {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
}

.comment-header-metadata > .hyphen-separator {
    margin-top: 0px;
    margin-bottom: 0px;
    margin-left: 0.6em;
    margin-right: 0.6em;
}


.comment-author {
    font-weight: 600;
    color: var(--comment-color-primary);
}

.comment-author-badge,
.comment-editorial-team-badge {
    background-color: var(--comment-article-author-color);
    border-radius: 4px;
    color: aliceblue;
    padding: 1px 5px;
}

.comment-editorial-team-badge {
    background-color: var(--comment-editorial-team-color);
}

.comment-date {
    color: grey;
    font-style: italic;
}

.comment-replying-to {
    color: grey;
}

.comment-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.6em;
    align-items: center;
    font-size: 0.85em;
}

.mobile-buttons {
    display: none;
}

.add-comment {
    padding-top: 1.7em;
    padding-bottom: 1.7em;
    margin-bottom: 1.2em;
}

.add-comment > p {
    font-weight: 600;
}

#add-comment-reply {
    display: none;
}

.add-comment .comment-replying-to {
    color: white;
}

.add-comment .comment-replying-to a {
    color: white;
    font-weight: 600;
}

.add-comment .comment-replying-to a:hover {
    color: #003c57;
    text-decoration: underline;
}

.add-comment-reply-active {
    display: block !important;
}

.comment-form {
    margin-top: 0.6em;
    border-radius: 4px;
    border: 1px solid #e7e7e7;
    box-shadow: 0px 1px 5px 0px #c7c7c7;
}

.comment-form-header {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    padding: 0.8em;
    border-bottom: 1px solid #c7c7c7;
    background-color: var(--comment-color-primary);
    color: white;
}

.comment-form .comment-author,
.comment-form .comment-date {
    color: white;
}

.comment-form-buttons {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    padding: 0.6em;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.comment-form .django-ckeditor-widget {
    display: block !important;
}

/* Remove some default borders of the CKEditor default skin. It clashes with the form style. */
.comment-form .django-ckeditor-widget > [class*="cke_"] {
    border: unset !important;
    border-bottom: 1px solid #d1d1d1 !important;
}

.comment-form-input-block {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    position: relative;
    margin: 10px;
}

.comment-form-input-block input[type="checkbox"] {
    width: 0.8em;
    height: 0.8em;
    margin: 0.8em;
}

.comment-form-input-block label {
    position: relative;
    top: -0.2em;
    font-weight: normal;
    font-size: 0.8em;
}

#add-comment-reply {
    /* 5px + margin of .child-comments */
    margin-left: calc(5px + min(8vw, 2.8em));
}

#add-comment-reply .comment-form:before {
    font-family: FontAwesome;
    content: "\f112";
    color: var(--comment-color-primary);
    font-weight: 900;
    display: inline-block;
    position: absolute;
    margin-top: 10px;
    margin-left: -2em;
    transform: rotate(180deg);
}

.comment-sign-in-wrapper {
    width: 100%;
    text-align: center;
}

.comment-sign-in{
    display: inline-flex;
    align-items: center;
    flex-direction: column;
}

.comment-sign-in-button {
    width: fit-content;
    padding: 0.6em 1.2em;
    color: rgb(0, 0, 0, 0.8);
    background-color: unset;
    border: unset;
    border-radius: 4px;
    box-shadow:  1px 1px 5px 0 rgb(0, 0, 0, 0.2);
}

.comment-sign-in-button:hover {
    background-color: #efefef;
    text-decoration: unset;
    color: unset;
}

.comment-sign-in i {
    margin-right: 5px;
    color: var(--color-primary);
}

.comment-buttons .custom-dropdown-content {
    margin-top: 5px;
    background-color: #fdfdfd;
    box-shadow:  1px 1px 5px 0 rgb(0, 0, 0, 0.2);
    border: 1px solid #ddd;
    border-radius: 4px;
}

.comment-buttons-mobile-wrapper {
    padding: 0.6em;
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    align-items: center
}

.comment-buttons button i {
    margin-right: 5px;
}

.comment-wrapper-submitted {
    background-color: #fff3b4;
}

.comment-preview-tag {
    color: var(--color-secondary);
    border: 2px solid var(--color-secondary);
    padding: 5px;
    border-radius: 3px;
    font-style: italic;
}

.display-none {
    display: none !important;
}

.comment-orcid-badge {
    height: 1.3em;
}

.show-more-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: min(40%, 8em);
    font-size: 0.9em;
}

.show-less-overlay {
    position: relative !important;
    left: unset !important;
    bottom: unset !important;
    height: auto !important;
}

.show-more-overlay > span {
    padding: 0.3em 0.6em;
    background-color: var(--color-primary);
    color: var(--color-text-primary);
    border-radius: 3px;
    box-shadow: 0px -1px 10px 0 rgba(0, 0, 0, 0.2);
}

.show-more-overlay > span:hover {
    cursor: pointer;
}
