﻿/* =========================================================
   FOR YOU NEWS
   ARTICLE COMMENTS SYSTEM — STYLES
   ========================================================= */


/* =========================================================
   1. SECTION WRAPPER
   ========================================================= */

.comments-section {

    margin-top: 48px;

    padding-top: 36px;

    border-top: 1px solid #e5e7e3;

    font-family: inherit;
}


.comments-header {

    display: flex;

    align-items: baseline;

    justify-content: space-between;

    gap: 12px;

    margin-bottom: 22px;
}


.comments-title {

    margin: 0;

    color: #14171a;

    font-size: 22px;

    font-weight: 750;

    letter-spacing: -0.01em;
}


.comments-count {

    color: #7b837d;

    font-size: 13px;

    font-weight: 600;

    white-space: nowrap;
}


/* =========================================================
   2. COMMENT FORM
   ========================================================= */

.comment-form {

    margin-bottom: 30px;

    padding: 18px;

    background: #fafaf8;

    border: 1px solid #e9ece9;

    border-radius: 10px;
}


.comment-form-inner {

    display: flex;

    align-items: flex-start;

    gap: 12px;
}


.comment-avatar {

    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    border-radius: 50%;

    background: #959896;

    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
    font-weight: 700;

    overflow: hidden;

    text-transform: uppercase;
}


.comment-avatar img {

    width: 100%;
    height: 100%;

    object-fit: cover;
}


.comment-form-content {

    flex: 1 1 auto;

    min-width: 0;
}


.comment-input {

    display: block;

    width: 100%;

    padding: 10px 12px;

    border: 1px solid #d8dcd8;

    border-radius: 8px;

    background: #ffffff;

    color: #14171a;

    font-family: inherit;

    font-size: 14px;

    line-height: 1.5;

    resize: vertical;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.comment-input::placeholder {

    color: #a4aaa5;
}


.comment-input:focus {

    outline: none;

    border-color: #312307;

    box-shadow:
        0 0 0 3px rgba(217, 154, 24, 0.16);
}


.comment-form-actions {

    display: flex;

    justify-content: flex-end;

    margin-top: 10px;
}


.comment-submit {

    min-height: 36px;

    padding: 0 18px;

    border: 1px solid #111512;

    border-radius: 6px;

    

    color: #29200d;

    font-size: 13px;

    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        opacity 0.15s ease;
}


.comment-submit:hover {

    background: #252b27;

    border-color: #252b27;
}


.comment-submit:disabled {

    opacity: 0.55;

    cursor: not-allowed;
}


/* =========================================================
   3. LOGIN REQUIRED STATE
   ========================================================= */

.comment-login-hint {

    display: none;

    align-items: center;

    gap: 10px;

    margin-top: 12px;

    padding: 10px 12px;

    background: #fff5dc;

    border: 1px solid #ead9a9;

    border-radius: 7px;

    color: #6b4e04;

    font-size: 13px;
}


.comment-login-hint[hidden] {

    display: none !important;
}


.comment-login-hint:not([hidden]) {

    display: flex;
}


.comment-login-hint #commentLoginButton {

    margin-left: auto;

    flex: 0 0 auto;

    min-height: 30px;

    padding: 0 12px;

    border: 1px solid #b77b08;

    border-radius: 5px;

    background: #ffffff;

    color: #b77b08;

    font-size: 12px;

    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}


.comment-login-hint #commentLoginButton:hover {

    background: #b77b08;

    color: #ffffff;
}


.comment-form.comment-login-required .comment-input {

    background: #f5f6f4;
}


/* =========================================================
   4. COMMENTS LIST
   ========================================================= */

.comments-list {

    display: flex;

    flex-direction: column;

    gap: 22px;
}


.comments-empty {

    padding: 26px 0;

    text-align: center;

    color: #7b837d;

    font-size: 14px;
}


/* =========================================================
   5. INDIVIDUAL COMMENT
   ========================================================= */

.comment-item {

    display: block;
}


.comment-header {

    display: flex;

    align-items: flex-start;

    gap: 11px;

    margin-bottom: 8px;
}


.comment-header .comment-avatar {

    width: 34px;
    height: 34px;

    font-size: 12px;
}


.comment-author-info {

    display: flex;

    flex-direction: column;

    gap: 2px;
}


.comment-author {

    color: #14171a;

    font-size: 13.5px;

    font-weight: 700;
}


.comment-date {

    color: #a0a7a1;

    font-size: 11.5px;
}


.comment-body {

    margin-left: 45px;
}


.comment-text {

    margin: 0;

    color: #333833;

    font-size: 14.5px;

    line-height: 1.6;

    white-space: pre-wrap;

    overflow-wrap: break-word;
}


/* =========================================================
   6. REPLY BUTTON / ACTIONS
   ========================================================= */

.comment-actions {

    margin-top: 8px;
}


.comment-reply-button {

    padding: 0;

    border: none;

    background: none;

    color: #59615b;

    font-size: 12.5px;

    font-weight: 700;

    cursor: pointer;

    transition: color 0.15s ease;
}


.comment-reply-button:hover {

    color: #412b00;

    text-decoration: underline;
}


/* =========================================================
   7. NESTED REPLIES
   ========================================================= */

.comment-replies {

    margin-top: 14px;

    margin-left: 45px;

    padding-left: 16px;

    border-left: 2px solid #e9ece9;

    display: flex;

    flex-direction: column;

    gap: 16px;
}


.comment-reply-item {

    margin-top: 0;
}


.comment-reply-item .comment-avatar {

    width: 28px;
    height: 28px;

    font-size: 11px;
}


.comment-reply-item .comment-body {

    margin-left: 38px;
}


.comment-reply-item .comment-text {

    font-size: 14px;
}


/* =========================================================
   8. REPLY FORM
   ========================================================= */

.comment-reply-form {

    margin-top: 10px;

    margin-left: 45px;
}


.comment-reply-input {

    width: 100%;

    padding: 8px 10px;

    border: 1px solid #d8dcd8;

    border-radius: 7px;

    background: #ffffff;

    color: #14171a;

    font-family: inherit;

    font-size: 13.5px;

    line-height: 1.5;

    resize: vertical;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.comment-reply-input:focus {

    outline: none;

    border-color: #b57c0c;

    box-shadow:
        0 0 0 3px rgba(217, 154, 24, 0.16);
}


.comment-reply-form .comment-form-actions {

    justify-content: flex-start;

    gap: 10px;

    margin-top: 8px;
}


.comment-reply-form .comment-submit {

    min-height: 32px;

    padding: 0 14px;

    font-size: 12.5px;
}


.comment-reply-cancel {

    padding: 0 6px;

    border: none;

    background: none;

    color: #7b837d;

    font-size: 12.5px;

    font-weight: 600;

    cursor: pointer;
}


.comment-reply-cancel:hover {

    color: #e1b905;

    text-decoration: underline;
}


/* =========================================================
   9. MOBILE
   ========================================================= */

@media (max-width: 640px) {

    .comments-section {

        margin-top: 34px;

        padding-top: 26px;
    }


    .comments-title {

        font-size: 19px;
    }


    .comment-form {

        padding: 14px;
    }


    .comment-body,
    .comment-replies,
    .comment-reply-form {

        margin-left: 0;
    }


    .comment-replies {

        padding-left: 12px;
    }


    .comment-avatar {

        width: 32px;
        height: 32px;

        font-size: 11px;
    }
}

/* =====================================================
   COMMENT SUBMIT — SEND ICON
===================================================== */

.comment-submit {
    width: 46px;
    height: 46px;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 50%;

    cursor: pointer;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
}


/* SEND ICON */

.comment-submit-icon {
    width: 21px;
    height: 21px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;

    pointer-events: none;
}


/* HOVER */

.comment-submit:hover {
    transform: translateY(-1px);
}


/* CLICK / POSTING STATE */

.comment-submit.is-posting {
    color: #ffffff;
    background-color: #f4c430;

    transform: scale(0.94);

    box-shadow: 0 0 0 4px rgba(244, 196, 48, 0.15);
}


/* DISABLED WHILE POSTING */

.comment-submit.is-posting:disabled {
    cursor: wait;
    opacity: 1;
}

/* =========================================================
   IMPORTANT OVERRIDE — FLOATING COMMENTS SYSTEM
   PASTE THIS BLOCK AT THE VERY END OF THE CSS FILE
   ========================================================= */

/* ---------------------------------------------------------
   1. COMMENTS SECTION POSITIONING
   --------------------------------------------------------- */

.comments-section {
    position: relative !important;
    z-index: 20 !important;
}


/* ---------------------------------------------------------
   2. FLOATING COMMENTS LIST
   --------------------------------------------------------- */

.comments-section .comments-list {
    position: absolute !important;

    left: 0 !important;
    right: 0 !important;

    top: var(--comments-overlay-top, 180px) !important;

    display: none !important;

    flex-direction: column !important;
    gap: 22px !important;

    max-height: min(620px, calc(100vh - 80px)) !important;

    overflow-y: auto !important;

    padding: 22px !important;

    background: #ffffff !important;

    border: 1px solid #e5e7e3 !important;
    border-radius: 12px !important;

    box-shadow:
        0 18px 45px rgba(20, 23, 26, 0.14) !important;

    box-sizing: border-box !important;

    z-index: 1000 !important;
}


/* ---------------------------------------------------------
   3. SHOW COMMENTS WHEN OPEN
   --------------------------------------------------------- */

.comments-section.comments-open .comments-list {
    display: flex !important;
}


/* ---------------------------------------------------------
   4. KEEP THE COMMENT EDITOR ABOVE THE OVERLAY
   --------------------------------------------------------- */

.comments-section .comment-form {
    position: relative !important;
    z-index: 1100 !important;
}


/* ---------------------------------------------------------
   5. COMMENT LIST SCROLLBAR
   --------------------------------------------------------- */

.comments-section .comments-list::-webkit-scrollbar {
    width: 7px !important;
}

.comments-section .comments-list::-webkit-scrollbar-track {
    background: transparent !important;
}

.comments-section .comments-list::-webkit-scrollbar-thumb {
    background: #d4d8d4 !important;
    border-radius: 10px !important;
}

.comments-section .comments-list::-webkit-scrollbar-thumb:hover {
    background: #b9beb9 !important;
}


/* ---------------------------------------------------------
   6. EMPTY COMMENTS MESSAGE
   --------------------------------------------------------- */

.comments-section .comments-empty {
    padding: 26px 0 !important;

    text-align: center !important;

    color: #7b837d !important;

    font-size: 14px !important;
}


/* ---------------------------------------------------------
   7. MOBILE
   --------------------------------------------------------- */

@media (max-width: 640px) {

    .comments-section .comments-list {
        left: 8px !important;
        right: 8px !important;

        padding: 16px !important;

        max-height: calc(100vh - 60px) !important;

        border-radius: 10px !important;
    }

}


/* =========================================================
   END IMPORTANT OVERRIDE
   ========================================================= */