/*
 * comments.css
 * Place at: wp-content/themes/twentytwentyone-child/assets/css/comments.css
 */

/* ── Variables ── */
:root {
    --red: #d9292a;
    --red-hover: #b82021;
    --red-light: #fdf2f2;
    --text: #1a1a1a;
    --body-text: #333;
    --muted: #888;
    --border: #e8e8e8;
    --bg: #fff;
}

/* ── Wrapper ── */
.discussion-wrap {
    width: 100%;
    margin: 40px auto;
    font-family: "Titillium Web", sans-serif;
}

/* ── Header ── */
.discussion-header {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-bottom: 20px;
}

.discussion-header h2 {
    font-family: "Open Sans", sans-serif !important;
    font-weight: 700;
    font-size: 24px;
    color: #D8212A;
    margin: 0;
}

.header-line {
    flex: 1;
    height: 7px;
    background: #D5D5D5;
    margin-top: 5px;
}

/* ── Compose Box (Textarea) ── */
.compose-box {
    border: 1px solid #D5D5D5;
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: border-color .2s, box-shadow .2s;
}

.compose-box:focus-within {
    border-color: #214082;
}

.compose-box textarea,
#discussion-form #comment {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-family: "Titillium Web", sans-serif;
    font-size: 16px;
    color: var(--text);
    background: transparent;
    height: 82px;
    line-height: 1.5;
    display: block;
    font-weight: 500;
}

.compose-box textarea::placeholder,
#discussion-form #comment::placeholder {
    color: #000;
}

/* ── Fields Row (Name + Email + Button) ── */
.fields-row,
#discussion-form .fields-row {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.fields-row input,
#discussion-form input[type="text"],
#discussion-form input[type="email"] {
    flex: 1;
    min-width: 120px;
    height: 47px;
    border: 1px solid #D5D5D5;
    padding: 20px;
    font-family: "Titillium Web", sans-serif;
    font-size: 16px;
    color: #000;
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}

.fields-row input:focus,
#discussion-form input[type="text"]:focus,
#discussion-form input[type="email"]:focus {
    border-color: #214082;
}

.fields-row input::placeholder,
#discussion-form input::placeholder {
    color: #000;
}

/* ── Submit Button ── */
.btn-comment,
#discussion-form .btn-comment,
#discussion-submit {
    height: 47px;
    padding: 12px 70px;
    background: #D8212A;
    color: #fff;
    border: none;
    font-family: "Titillium Web", sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s, transform .1s;
}

#discussion-submit {
    padding: 6px 70px;
    background: #000 !important;
    color: #fff !important;
    margin-bottom: 40px;
    font-size: 17px;
}

.btn-comment:hover,
#discussion-submit:hover {
    background: var(--red-hover);
}

.btn-comment:active,
#discussion-submit:active {
    transform: scale(.97);
}

/* ── Hide WP default form elements we don't need ── */
#discussion-form label,
#discussion-form .comment-form-url,
#discussion-form .comment-form-cookies-consent,
.discussion-form p.comment-notes {
    display: none !important;
}

/* ── Divider ── */
.divider {
    height: 1px;
    background: #D5D5D5;
    margin-block: 40px;
}

/* ── Comment Row ── */
.comment {
    display: flex !important;
    gap: 12px;
    margin-bottom: 0;
}

/* ── Avatar ── */
.avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #000;
    background: #FFCED0;
}

.avatar-sm {
    width: 34px !important;
    height: 34px !important;
    font-size: .72rem !important;
}

/* ── Comment Body ── */
.comment-body {
    flex: 1;
    min-width: 0;
    margin-bottom: 40px;
    text-align: left;
}

/* ── Meta (name + time) ── */
.comment-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
    margin-top: 4px;

}


.comment-author {
    font-weight: 600;
    font-size: 14px;
    color: #7F7F7F;
}

.badge-author {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    background: var(--red);
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
}

.comment-time {
    font-size: 10px;
    color: #969696;
    text-transform: uppercase;
    font-weight: 600;
}

.comment-meta .comment-author {
    font-size: 16px;
}

/* ── Comment Text ── */
.comment-text,
.comment-text p {
    color: #000;
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 17px;
}

.comment-text {
    margin-top: 14px;
    font-size: 12px;
    font-weight: 400;
    color: #000;
}

/* ── Moderation Notice ── */
.comment-pending {
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: 6px;
}

/* ── Actions (Reply button) ── */
.actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 2px;
    margin-top: 0;
}

.action-btn,
.comment-reply-link {
    background: none;
    border: none;
    cursor: pointer;
    font-family: "Titillium Web", sans-serif;
    font-size: 14px;
    color: #969696;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    gap: 4px;
    padding: 2px 0;
    transition: color .15s;
    text-decoration: none;
}

.action-btn:hover,
.comment-reply-link:hover {
    color: var(--red);
}

.action-btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* ── Toggle Replies Button ── */
.toggle-replies {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: "Titillium Web", sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #000;
    padding: 6px 0 0;
    transition: color .15s;
    flex-direction: row-reverse;
    margin-top: 15px;
}

.toggle-replies:hover {
    color: var(--red);
}

.toggle-icon {
    width: 16px;
    height: 16px;
    border: 1.5px solid currentColor;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    line-height: 10px;
    font-style: normal;
    display: inline-block;
}

/* ── Replies Container ── */
.replies-container {
    display: none;
    margin-top: 12px;
    padding-left: 17px;
    border-left: 1px solid #000;
}

.replies-container.open {
    display: block;
}

/* ── No Comments ── */
.no-comments {
    color: var(--muted);
    font-size: .88rem;
    padding: 10px 0;
}

/* ── Load More ── */
.load-more-wrap {
    margin-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.btn-load-more {
    width: 100%;
    height: 44px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-family: "Titillium Web", sans-serif;
    font-size: .84rem;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    letter-spacing: .02em;
    transition: border-color .2s, color .2s, background .2s;
}

.btn-load-more:hover {
    border-color: var(--red);
    color: var(--red);
    background: var(--red-light);
}

/* ── Cancel Reply Link ── */
#cancel-comment-reply-link {
    font-size: .78rem;
    text-decoration: none;
    margin-left: 10px;
}

#cancel-comment-reply-link:hover {
    color: #214082;
}

/* ── Mobile reCAPTCHA ── */
.mob_cab {
    bottom: -70px !important;
    transition: bottom 0.3s ease;
}

.add_mob_cab {
    bottom: 14px !important;
    transition: bottom 0.3s ease;
}

.allcomment button {
    background-color: transparent !important;
    color: #000 !important;
}

.comment-reply-title {
    font-size: 24px !important;
    font-weight: 700;
    color: #224082;
    font-family: "Open Sans", sans-serif !important;
}

#cancel-comment-reply-link {
    border: 1px solid red;
    padding: 6px;
    color: red;
    font-weight: 800;
    line-height: 16px;
    display: inline-block;
    text-transform: capitalize;
    font-size: 13px;
}

.btn-load-more {

    border: 1px solid #D5D5D5;
    border-radius: 0;
    color: #000 !important;
    background-color: #fff !important;
    padding: 9px;
    font-size: 17px;
    height: 45px;
    font-weight: 600;
}

.btn-load-more:hover {
    border-color: #214082;
    color: #214082 !important;
    background-color: #f0f0f0 !important;
}

.comment-vote img {
    width: 12px;
}


@media(max-width:1023px) {
    .comment-body {
        margin-bottom: 20px;
    }
}

/* ── Mobile Responsive ── */
@media (max-width: 600px) {

    .fields-row,
    #discussion-form .fields-row {
        flex-direction: column;
    }

    .fields-row input,
    #discussion-form input[type="text"],
    #discussion-form input[type="email"] {
        width: 100%;
    }

    .btn-comment,
    #discussion-submit {
        width: 100%;
    }

    .fields-row input, #discussion-form input[type="text"], #discussion-form input[type="email"] {
        padding: 10px;
    }

    .comment-vote img {
        width: 12px !important;
    }

    .comment-text, .comment-text p {
        text-align: left;
    }

    .comment-text {
        margin-top: 0;
    }

    .actions {
        gap: 5px;
    }

    .divider {
        margin: 0 0 35px 0;
    }

    .discussion-header {
        margin-bottom: 10px;
    }

    .discussion-wrap {
        margin: 15px auto 40px;
    }

    .toggle-replies {
        margin-bottom: 0;
    }

    .fields-row{
        margin-bottom: 10px;
    }
}

.comment-vote {
    text-decoration: none;
    color: #969696;
    font-size: 13px;
    margin-left: 12px;
    transition: .2s;
    font-weight: 600;
}

.comment-vote:hover {
    color: #d9292a;
}

