/* Comments section — single posts */

.mrj3y-c-wrap {
    margin: 30px 0 0;
    padding: 24px;
    background: linear-gradient(
        135deg,
        rgba(var(--mrj3y-accent-rgb, 45, 212, 191), 0.05) 0%,
        var(--mrj3y-surface-alt, #d4e8e6) 55%,
        #fff 100%
    );
    border: 1px solid rgba(var(--mrj3y-brand-rgb, 6, 58, 66), 0.18);
    border-top: 4px solid var(--mrj3y-accent, #2dd4bf);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(var(--mrj3y-brand-rgb, 6, 58, 66), 0.08);
    backdrop-filter: saturate(160%) blur(8px);
    -webkit-backdrop-filter: saturate(160%) blur(8px);
    direction: rtl;
    position: relative;
    overflow: hidden;
}

.mrj3y-c-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--mrj3y-main-a, #021a1f) 0%,
        var(--mrj3y-accent, #2dd4bf) 50%,
        var(--mrj3y-main-b, #0a4a52) 100%
    );
    opacity: 0.9;
}

.mrj3y-c-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.mrj3y-c-head__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--mrj3y-main-a, #021a1f), var(--mrj3y-main-b, #0a4a52));
    color: var(--mrj3y-on-dark, #ecfdfb);
    box-shadow: 0 4px 12px rgba(var(--mrj3y-brand-rgb, 6, 58, 66), 0.25);
}

.mrj3y-c-head__icon svg {
    width: 22px;
    height: 22px;
}

.mrj3y-c-head__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--mrj3y-post-title, #021a1f);
    line-height: 1.2;
}

.mrj3y-c-head__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    margin-right: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--mrj3y-on-dark, #ecfdfb);
    background: linear-gradient(135deg, var(--mrj3y-main-a, #021a1f), var(--mrj3y-accent, #2dd4bf));
    border-radius: 999px;
    vertical-align: middle;
}

.mrj3y-c-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mrj3y-c-list .children {
    list-style: none;
    margin: 14px 0 0;
    padding: 0 24px 0 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-right: 2px dashed rgba(148, 163, 184, 0.25);
}

.mrj3y-c-item {
    margin: 0;
}

.mrj3y-c-card {
    position: relative;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mrj3y-c-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
}

.mrj3y-c-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 10px;
}

.mrj3y-c-avatar img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: block;
    border: 2px solid rgba(var(--mrj3y-brand-rgb, 6, 58, 66), 0.28);
}

.mrj3y-c-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.mrj3y-c-author {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--mrj3y-post-title, #021a1f);
    line-height: 1.2;
}

.mrj3y-c-author a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mrj3y-c-author a:hover {
    color: var(--mrj3y-accent, #2dd4bf);
}

.mrj3y-c-date {
    font-size: 12px;
    color: var(--mrj3y-post-meta, #5f6f78);
    font-weight: 500;
}

.mrj3y-c-pending {
    margin: 6px 0 8px;
    padding: 6px 12px;
    font-size: 12.5px;
    color: #92400e;
    background: #fef3c7;
    border-right: 3px solid #f59e0b;
    border-radius: 8px;
}

.mrj3y-c-body {
    font-size: 15px;
    line-height: 1.75;
    color: var(--mrj3y-post-body, #4b5e66);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.mrj3y-c-body p {
    margin: 0 0 8px;
}

.mrj3y-c-body p:last-child {
    margin: 0;
}

.mrj3y-c-card__foot {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.mrj3y-c-card__foot .comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mrj3y-post-meta-link, var(--mrj3y-brand, #063a42));
    background: rgba(var(--mrj3y-brand-rgb, 6, 58, 66), 0.08);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mrj3y-c-card__foot .comment-reply-link:hover {
    background: linear-gradient(135deg, var(--mrj3y-main-a, #021a1f), var(--mrj3y-main-b, #0a4a52));
    color: var(--mrj3y-on-dark, #ecfdfb);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(var(--mrj3y-brand-rgb, 6, 58, 66), 0.22);
}

.mrj3y-c-card__foot .comment-reply-link svg {
    width: 14px;
    height: 14px;
}

.mrj3y-c-pagination {
    margin: 16px 0;
    text-align: center;
}

.mrj3y-c-pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.05);
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mrj3y-c-pagination .page-numbers.current,
.mrj3y-c-pagination .page-numbers:hover {
    background: linear-gradient(135deg, var(--mrj3y-main-a, #021a1f), var(--mrj3y-accent, #2dd4bf));
    color: var(--mrj3y-on-dark, #ecfdfb);
}

.mrj3y-c-closed {
    padding: 14px 16px;
    background: rgba(148, 163, 184, 0.08);
    border-radius: 10px;
    color: #64748b;
    font-size: 13.5px;
    text-align: center;
}

.mrj3y-c-form-wrap {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.mrj3y-c-form-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: var(--mrj3y-post-title, #021a1f);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mrj3y-c-form-title svg {
    width: 20px;
    height: 20px;
    color: var(--mrj3y-accent, #2dd4bf);
}

.mrj3y-c-form-note {
    margin: 0 0 16px;
    font-size: 12.5px;
    color: var(--mrj3y-post-meta, #5f6f78);
}

.mrj3y-c-form-note .mrj3y-c-required {
    color: #dc2626;
    font-weight: 700;
}

.mrj3y-c-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
}

.mrj3y-c-form > p,
.mrj3y-c-form > .form-submit,
.mrj3y-c-form .comment-form-cookies-consent,
.mrj3y-c-form .logged-in-as {
    grid-column: 1 / -1;
    margin: 0;
}

.mrj3y-c-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.mrj3y-c-field--full {
    grid-column: 1 / -1;
}

.mrj3y-c-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--mrj3y-post-meta, #5f6f78);
}

.mrj3y-c-req {
    color: #dc2626;
}

.mrj3y-c-field input,
.mrj3y-c-field textarea {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    color: #0f172a;
    background: #fff;
    border: 1.5px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.mrj3y-c-field input:focus,
.mrj3y-c-field textarea:focus {
    outline: none;
    border-color: var(--mrj3y-accent, #2dd4bf);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(var(--mrj3y-accent-rgb, 45, 212, 191), 0.15);
}

.mrj3y-c-field textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.65;
}

.mrj3y-c-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--mrj3y-on-dark, #ecfdfb);
    background: linear-gradient(135deg, var(--mrj3y-main-a, #021a1f), var(--mrj3y-main-b, #0a4a52));
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.3s ease;
    box-shadow: 0 4px 14px rgba(var(--mrj3y-brand-rgb, 6, 58, 66), 0.22);
    align-self: flex-start;
    font-family: inherit;
}

.mrj3y-c-submit:hover {
    background: linear-gradient(135deg, var(--mrj3y-main-b, #0a4a52), var(--mrj3y-accent, #2dd4bf));
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--mrj3y-accent-rgb, 45, 212, 191), 0.28);
}

.mrj3y-c-submit:active {
    transform: translateY(0);
}

.mrj3y-c-submit svg {
    width: 16px;
    height: 16px;
    transition: transform 0.25s ease;
}

.mrj3y-c-submit:hover svg {
    transform: translateX(-3px);
}

.mrj3y-c-empty {
    margin: 0 0 18px;
    padding: 18px;
    text-align: center;
    color: #64748b;
    background: rgba(148, 163, 184, 0.06);
    border: 1px dashed rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    font-size: 14px;
}

@media (max-width: 600px) {
    .mrj3y-c-wrap {
        padding: 16px;
        margin: 24px 0 0;
        border-radius: 14px;
    }

    .mrj3y-c-head {
        margin-bottom: 16px;
    }

    .mrj3y-c-head__icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .mrj3y-c-head__title {
        font-size: 17px;
    }

    .mrj3y-c-card {
        padding: 13px 14px;
        border-radius: 12px;
    }

    .mrj3y-c-avatar img {
        width: 40px;
        height: 40px;
    }

    .mrj3y-c-body {
        font-size: 14px;
    }

    .mrj3y-c-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mrj3y-c-list .children {
        padding-right: 14px;
    }
}

body.mrj3y-dark-mode .mrj3y-c-wrap {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.85));
    border-color: rgba(71, 85, 105, 0.45);
}

body.mrj3y-dark-mode .mrj3y-c-head {
    border-bottom-color: rgba(71, 85, 105, 0.4);
}

body.mrj3y-dark-mode .mrj3y-c-head__title {
    color: #f1f5f9;
}

body.mrj3y-dark-mode .mrj3y-c-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(71, 85, 105, 0.4);
}

body.mrj3y-dark-mode .mrj3y-c-author {
    color: #f1f5f9;
}

body.mrj3y-dark-mode .mrj3y-c-author a:hover {
    color: #60a5fa;
}

body.mrj3y-dark-mode .mrj3y-c-date {
    color: #94a3b8;
}

body.mrj3y-dark-mode .mrj3y-c-body {
    color: #cbd5e1;
}

body.mrj3y-dark-mode .mrj3y-c-form-title {
    color: #f1f5f9;
}

body.mrj3y-dark-mode .mrj3y-c-form-note {
    color: #94a3b8;
}

body.mrj3y-dark-mode .mrj3y-c-field label {
    color: #cbd5e1;
}

body.mrj3y-dark-mode .mrj3y-c-field input,
body.mrj3y-dark-mode .mrj3y-c-field textarea {
    background: rgba(15, 23, 42, 0.6);
    color: #f1f5f9;
    border-color: rgba(71, 85, 105, 0.45);
}

body.mrj3y-dark-mode .mrj3y-c-field input:focus,
body.mrj3y-dark-mode .mrj3y-c-field textarea:focus {
    background: rgba(15, 23, 42, 0.85);
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
}

body.mrj3y-dark-mode .mrj3y-c-closed,
body.mrj3y-dark-mode .mrj3y-c-empty {
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
}

body.mrj3y-dark-mode .mrj3y-c-form-wrap {
    border-top-color: rgba(71, 85, 105, 0.4);
}

body.mrj3y-dark-mode .mrj3y-c-pagination .page-numbers {
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}

/* فراغ ثابت 20px بين التعليقات (آخر محتوى) والفوتر — موبايل + ديسكتوب */
#comments.mrj3y-c-wrap,
.mrj3y-c-wrap {
    margin-bottom: 0 !important;
}

.mrj3y-main > .mrj3y-container {
    margin-bottom: var(--mrj3y-comments-footer-gap, 20px) !important;
}

footer.mrj3y-footer,
.mrj3y-footer {
    margin-top: 0 !important;
}
