/* =========================================================
 * M2F Comments — Minimal modern
 * ========================================================= */

.m2f-comments {
    margin: 30px auto;
    max-width: 900px;
    font-size: 14.5px;
    line-height: 1.6;
    color: inherit;
}

.m2f-c-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}
.m2f-c-title {
    font-size: 18px;
    margin: 0;
    font-weight: 700;
}
.m2f-c-count {
    opacity: .65;
    font-weight: 400;
    font-size: 14px;
    margin-left: 4px;
}
.m2f-c-sort-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,.15);
    color: inherit;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .15s, border-color .15s;
}
.m2f-c-sort-btn:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.3);
}
.m2f-c-sort-icon { opacity: .6; }

/* ===== Form ===== */
.m2f-c-form {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 24px;
    transition: border-color .15s;
}
.m2f-c-form:focus-within { border-color: rgba(76,175,80,.5); }

.m2f-c-textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: inherit;
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.5;
    resize: vertical;
    min-height: 70px;
    padding: 4px;
    box-sizing: border-box;
}
.m2f-c-textarea::placeholder { opacity: .45; }

.m2f-c-form-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.cf-turnstile { display: inline-block; }
.m2f-c-submit {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s, box-shadow .15s, opacity .15s;
    box-shadow: 0 2px 8px rgba(76,175,80,.25);
}
.m2f-c-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76,175,80,.4);
}
.m2f-c-submit:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}
.m2f-c-form-msg {
    margin-top: 8px;
    font-size: 13px;
    min-height: 0;
    transition: min-height .15s;
}
.m2f-c-form-msg.m2f-c-msg-error {
    color: #ef4444;
    min-height: 18px;
}
.m2f-c-form-msg.m2f-c-msg-success {
    color: #10b981;
    min-height: 18px;
}

/* reply indicator */
.m2f-c-form[data-parent]:not([data-parent="0"]) {
    border-color: rgba(76,175,80,.5);
    background: rgba(76,175,80,.04);
}
.m2f-c-reply-to {
    display: none;
    font-size: 12px;
    opacity: .8;
    margin-bottom: 6px;
}
.m2f-c-reply-to.show { display: block; }
.m2f-c-reply-to .m2f-c-cancel-reply {
    background: transparent;
    border: 0;
    color: #ef4444;
    cursor: pointer;
    padding: 0 0 0 6px;
    font-size: 12px;
}

/* ===== List ===== */
.m2f-c-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.m2f-c-empty {
    padding: 32px;
    text-align: center;
    opacity: .55;
    font-style: italic;
}
.m2f-c-group.m2f-c-hidden { display: none; }

/* ===== Comment ===== */
.m2f-c {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
    padding: 12px 14px;
    transition: background .12s;
    animation: m2f-c-fadein .25s ease-out;
}
.m2f-c:hover { background: rgba(255,255,255,.05); }

@keyframes m2f-c-fadein {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.m2f-c-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
}
.m2f-c-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}
.m2f-c-author {
    font-weight: 600;
    color: inherit;
}
.m2f-c-sep { opacity: .35; }
.m2f-c-time {
    opacity: .55;
    font-size: 12px;
}
.m2f-c-del-btn {
    margin-left: auto;
    background: transparent;
    border: 1px solid rgba(239,68,68,.3);
    color: #ef4444;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, border-color .12s;
    padding: 0;
}
.m2f-c-del-btn:hover {
    background: rgba(239,68,68,.15);
    border-color: #ef4444;
}

.m2f-c-body {
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.55;
    padding-left: 36px; /* align under author */
}
.m2f-c-actions {
    margin-top: 6px;
    padding-left: 36px;
}
.m2f-c-reply-btn {
    background: transparent;
    border: 0;
    color: inherit;
    opacity: .55;
    cursor: pointer;
    font-size: 12.5px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: opacity .12s, background .12s;
}
.m2f-c-reply-btn:hover {
    opacity: 1;
    background: rgba(255,255,255,.05);
}

/* ===== Reply (nested) ===== */
.m2f-c-replies {
    margin-top: 8px;
    margin-left: 36px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-left: 2px solid rgba(255,255,255,.08);
    padding-left: 12px;
}
.m2f-c-replies:empty { display: none; }
.m2f-c-reply {
    background: rgba(255,255,255,.02);
}
.m2f-c-reply .m2f-c-avatar {
    width: 24px;
    height: 24px;
    font-size: 11px;
}
.m2f-c-reply .m2f-c-body {
    padding-left: 32px;
    font-size: 13.5px;
}

/* ===== View all button ===== */
.m2f-c-viewall-btn {
    margin: 18px auto 0 auto;
    display: block;
    background: transparent;
    border: 1px solid rgba(255,255,255,.2);
    color: inherit;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13.5px;
    transition: background .15s, border-color .15s;
}
.m2f-c-viewall-btn:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.4);
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .m2f-c-header { font-size: 14px; }
    .m2f-c-title { font-size: 16px; }
    .m2f-c-body, .m2f-c-actions { padding-left: 0; margin-top: 8px; }
    .m2f-c-replies { margin-left: 12px; padding-left: 10px; }
    .m2f-c-form-bottom {
        flex-direction: column;
        align-items: stretch;
    }
    .m2f-c-submit { width: 100%; }
}
