/* ==========================================================================
   FBC Comments
   ========================================================================== */

/* --------------------------------------------------------------------------
   Comments Container
   -------------------------------------------------------------------------- */

#comments.comments_section {
    margin-block: 24px;
    padding: 20px;

    background: #fff;
    color: #172033;

    border: 1px solid #e6e9ee;
    border-radius: 16px;
}

#comments * {
    box-sizing: border-box;
}


/* --------------------------------------------------------------------------
   Comments Header
   -------------------------------------------------------------------------- */

#comments .comments-section_heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 22px;
    padding-bottom: 18px;

    border-bottom: 1px solid #e6e9ee;
}

#comments .comments-section_heading h2 {
    margin: 0;

    color: #111827;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
}

#comments .comments-section_intro {
    margin: 4px 0 0;

    color: #6b7280;
    font-size: 12px;
}

#comments .comments-section_count {
    display: inline-flex;
    align-items: center;

    min-height: 25px;
    padding: 3px 9px;

    background: #f0f5ff;
    color: var(--publisher-primary-color);

    border: 1px solid #dbe7ff;
    border-radius: 999px;

    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}


/* --------------------------------------------------------------------------
   Comment Status
   -------------------------------------------------------------------------- */

#comments .wsl-comment-status:empty {
    display: none;
}


/* --------------------------------------------------------------------------
   Comments Lists
   -------------------------------------------------------------------------- */

#comments .wsl-comments__list,
#comments .wsl-comments__list ul.children {
    margin: 0;
    padding: 0;

    list-style: none;
}

#comments .wsl-comments__list ul.children {
    margin: 10px 0 0;
    margin-inline-start: 30px;
    padding-inline-start: 14px;

    border-inline-start: 2px solid #e5e7eb;
}

#comments .wsl-comments__list ul.children[hidden] {
    display: none !important;
}

#comments .wsl-comment {
    margin: 0 0 17px;

    list-style: none;
}


/* --------------------------------------------------------------------------
   Comment Layout
   -------------------------------------------------------------------------- */

#comments .comment-block {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

#comments .wsl-avatar {
    flex: 0 0 40px;
}

#comments .wsl-avatar-img {
    display: block;

    width: 40px;
    height: 40px;

    object-fit: cover;

    border: 2px solid #fff;
    border-radius: 50%;

    box-shadow: 0 0 0 1px #e5e7eb;
}

#comments .wsl-comment-body {
    flex: 1;
    min-width: 0;
}


/* --------------------------------------------------------------------------
   Comment Bubble
   -------------------------------------------------------------------------- */

#comments .wsl-comment-bubble {
    position: relative;

    display: inline-block;

    max-width: min(100%, 720px);
}

#comments .wsl-comment-bubble__content {
    display: block;

    padding: 10px 14px;

    background: #f1f3f6;

    border: 1px solid transparent;
    border-radius: 17px;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

#comments .wsl-comment-bubble__content:hover {
    background: #eceff3;
    border-color: #e1e5ea;
}

#comments .wsl-comment-bubble__content--pending {
    background: #fff9db;
    border-color: #f2df8f;
}


/* --------------------------------------------------------------------------
   Comment Header
   -------------------------------------------------------------------------- */

#comments .wsl-comment-bubble__headline {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px;
}

#comments .wsl-comment-bubble__author {
    color: #111827;
    font-size: 13px;
    font-weight: 750;
}

#comments .wsl-comment-bubble__separator {
    color: #9ca3af;
    font-size: 12px;
}

#comments .wsl-comment-bubble__time {
    color: #6b7280;
    font-size: 11px;
    text-decoration: none;
}

#comments .wsl-comment-bubble__time:hover {
    color: var(--publisher-primary-color);
    text-decoration: underline;
}


/* --------------------------------------------------------------------------
   Comment Content
   -------------------------------------------------------------------------- */

#comments .wsl-comment-bubble__text {
    margin-top: 4px;

    color: #202938;
    font-size: 14px;
    line-height: 1.65;

    text-align: start;
    unicode-bidi: plaintext;

    overflow-wrap: anywhere;
}

#comments .wsl-comment-bubble__text > :first-child {
    margin-top: 0;
}

#comments .wsl-comment-bubble__text > :last-child {
    margin-bottom: 0;
}

#comments .wsl-comment-bubble__text p {
    margin: 0.35em 0;
}


/* --------------------------------------------------------------------------
   Pending Comment
   -------------------------------------------------------------------------- */

#comments .wsl-pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    margin: 7px 0 1px;
    padding: 3px 8px;

    background: #fff3cd;
    color: #815f00;

    border-radius: 999px;

    font-size: 10px;
    font-weight: 700;
}

#comments .wsl-pending-badge svg {
    flex: none;
}


/* --------------------------------------------------------------------------
   Comment Actions
   -------------------------------------------------------------------------- */

#comments .wsl-comment-footer {
    display: flex;
    align-items: center;
    gap: 13px;

    margin-top: 7px;
    padding-inline-start: 12px;
}

#comments .wsl-action-btn,
#comments .wsl-toggle-replies {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 4px 6px;

    background: transparent;
    color: #667085;

    border: 0;
    border-radius: 7px;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;
    text-decoration: none;
}

#comments .wsl-toggle-replies[hidden] {
    display: none !important;
}

#comments .wsl-action-btn a {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: inherit;
    text-decoration: none;
}

#comments .wsl-action-btn:hover,
#comments .wsl-toggle-replies:hover {
    background: #eef4ff;
    color: var(--publisher-primary-color);
}

#comments .wsl-toggle-replies-icon {
    display: inline-flex;

    transition: transform 0.16s ease;
}

#comments .wsl-toggle-replies[aria-expanded="true"]
    .wsl-toggle-replies-icon {
    transform: rotate(180deg);
}


/* --------------------------------------------------------------------------
   Comment Form
   -------------------------------------------------------------------------- */

#comments .comment-respond {
    margin: 0 0 25px;
    padding: 0 0 20px;

    border-bottom: 1px solid #e6e9ee;
}

#comments .comment-reply_title {
    margin: 0 0 10px;

    color: #111827;
    font-size: 14px;
    font-weight: 750;
}

#comments .comment-form_field {
    display: flex;
    flex-direction: column;
    gap: 6px;

    margin-bottom: 11px;
}

#comments .comment-form_field label {
    color: #344054;
    font-size: 12px;
    font-weight: 700;
}


/* --------------------------------------------------------------------------
   Form Inputs
   -------------------------------------------------------------------------- */

#comments .comment-form_input {
    width: 100% !important;

    padding: 11px 13px !important;

    background: #f5f6f8 !important;
    color: #111827 !important;

    border: 1px solid #e2e6eb !important;
    border-radius: 11px !important;

    outline: none;

    font: inherit;
    font-size: 14px !important;

    text-align: start;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

#comments .comment-form_input:hover {
    border-color: #cdd3db !important;
}

#comments .comment-form_input:focus {
    background: #fff !important;
    border-color: #4f83e3 !important;

    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

#comments textarea.comment-form_input {
    min-height: 90px;
    max-height: 360px;

    resize: vertical;
    unicode-bidi: plaintext;
}


/* --------------------------------------------------------------------------
   Character Counter
   -------------------------------------------------------------------------- */

#comments #wsl-char-count {
    color: #6b7280;
    font-size: 11px;

    text-align: end;
    direction: ltr;
}

#comments #wsl-char-count.is-invalid {
    color: #c62828;
    font-weight: 700;
}


/* --------------------------------------------------------------------------
   Form Actions
   -------------------------------------------------------------------------- */

#comments .comment-form_actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;

    margin-top: 12px;
}


/* --------------------------------------------------------------------------
   Submit & Cancel Buttons
   -------------------------------------------------------------------------- */

#comments .comment-submit_btn,
#comments #cancel-comment-reply-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    min-height: 38px;
    padding: 9px 15px;

    border: 0;
    border-radius: 10px;

    font: inherit;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;

    text-decoration: none;
    cursor: pointer;

    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}


/* Submit Button */

#comments .comment-submit_btn {
    background: var(--publisher-primary-color);
    color: #fff;

    box-shadow: 0 3px 9px rgba(37, 99, 235, 0.18);
}

#comments .comment-submit_btn:hover {
    background: #1d4ed8;
    color: #fff;

    transform: translateY(-1px);

    box-shadow: 0 5px 12px rgba(37, 99, 235, 0.24);
}

#comments .comment-submit_btn:disabled {
    opacity: 0.6;

    cursor: wait;

    transform: none;

    box-shadow: none;
}


/* Cancel Reply Button */

#comments #cancel-comment-reply-link {
    background: #dc2626;
    color: #fff;

    box-shadow: 0 3px 9px rgba(220, 38, 38, 0.18);
}

#comments #cancel-comment-reply-link:hover {
    background: #b91c1c;
    color: #fff;

    transform: translateY(-1px);

    box-shadow: 0 5px 12px rgba(220, 38, 38, 0.24);
}


/* Button States */

#comments #cancel-comment-reply-link:active,
#comments .comment-submit_btn:active {
    transform: translateY(0);
}

#comments .comment-submit_btn svg,
#comments #cancel-comment-reply-link svg {
    width: 15px;
    height: 15px;

    flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   Login / Authentication Messages
   -------------------------------------------------------------------------- */

#comments .comment-logged_in_as,
#comments .comment-must_log_in {
    margin: 0 0 9px;

    color: #667085;
    font-size: 12px;
}

#comments .comment-logged_in_as a,
#comments .comment-must_log_in a {
    color: var(--publisher-primary-color);
    text-decoration: none;
}


/* --------------------------------------------------------------------------
   Empty / Closed Comments
   -------------------------------------------------------------------------- */

#comments .wsl-comments__empty,
#comments .wsl-comments__closed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    margin: 15px 0 0;
    padding: 13px;

    background: #f7f8fa;
    color: #667085;

    border: 1px dashed #d9dee5;
    border-radius: 11px;

    font-size: 12px;
    text-align: center;
}


/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

#comments .wsl-comments__pagination {
    margin-top: 22px;
    padding-top: 17px;

    border-top: 1px solid #e6e9ee;
}

#comments .wsl-comments__pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

#comments .wsl-comments__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 29px;
    height: 29px;
    padding: 0 7px;

    background: #f4f6f8;
    color: #667085;

    border: 1px solid #e4e7ec;
    border-radius: 7px;

    font-size: 11px;
    font-weight: 750;

    text-decoration: none;
}

#comments .wsl-comments__pagination a.page-numbers:hover {
    background: #eef4ff;
    color: var(--publisher-primary-color);

    border-color: #cfe0ff;
}

#comments .wsl-comments__pagination .page-numbers.current {
    background: var(--publisher-primary-color);
    color: #fff;

    border-color: var(--publisher-primary-color);
}

#comments .wsl-pagination-icon {
    display: inline-flex;
}


/* --------------------------------------------------------------------------
   Honeypot
   -------------------------------------------------------------------------- */

#comments .wsl-honeypot {
    position: absolute !important;

    inset-inline-start: -10000px !important;

    width: 1px !important;
    height: 1px !important;

    overflow: hidden !important;
    opacity: 0 !important;

    pointer-events: none !important;
}


/* --------------------------------------------------------------------------
   Accessibility / Focus
   -------------------------------------------------------------------------- */

#comments button:focus-visible,
#comments a:focus-visible,
#comments input:focus-visible,
#comments textarea:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.2);
    outline-offset: 2px;
}


/* --------------------------------------------------------------------------
   RTL
   -------------------------------------------------------------------------- */

.rtl #comments .wsl-pagination-icon {
    transform: scaleX(-1);
}


/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */

@keyframes fbcFadeIn {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#comments .wsl-comments__list .children[data-open="1"] {
    animation: fbcFadeIn 0.16s ease-out;
}


/* --------------------------------------------------------------------------
   Responsive — Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 620px) {
    #comments.comments_section {
        padding: 15px;
        border-radius: 13px;
    }

    #comments .comments-section_heading {
        gap: 10px;
    }

    #comments .comments-section_intro {
        display: none;
    }

    #comments .wsl-comments__list ul.children {
        margin-inline-start: 17px;
        padding-inline-start: 9px;
    }

    #comments .wsl-avatar {
        flex-basis: 34px;
    }

    #comments .wsl-avatar-img {
        width: 34px;
        height: 34px;
    }

    #comments .wsl-comment-bubble__content {
        padding: 9px 12px;
    }

    #comments .comment-form_actions {
        justify-content: stretch;
    }

    #comments .comment-submit_btn {
        flex: 1;
    }
}


/* --------------------------------------------------------------------------
   Reduced Motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    #comments *,
    #comments *::before,
    #comments *::after {
        animation: none !important;
        transition: none !important;
    }
}