
/* =========================================================
   Modern Comments UI
   ========================================================= */

:root {
    --bg: #ffffff;
    --soft-bg: #f8fafc;

    --border: #e5e7eb;

    --text: #1f2937;
    --muted: #6b7280;

    --accent: #2563eb;

    --shadow:
        0 2px 10px rgba(0,0,0,0.04);

    --shadow-hover:
        0 8px 24px rgba(0,0,0,0.08);
}

/* =========================================================
   Container
   ========================================================= */

#comments-section {
    width: 100%;
}

/* =========================================================
   Comment
   ========================================================= */

.comment {
    position: relative;

    background: var(--bg);

    border: 1px solid var(--border);

    border-radius: 16px;

    padding: 1rem 1.1rem;

    margin-bottom: 1rem;

    box-shadow: var(--shadow);

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

.comment:hover {
    transform: translateY(-2px);

    box-shadow: var(--shadow-hover);

    border-color: #d6dbe1;
}

/* =========================================================
   Reply comment
   ========================================================= */

.comment.reply {

    margin-left: 1rem;

    margin-top: 0.75rem;

    background:
        linear-gradient(
            to right,
            rgba(37, 99, 235, 0.04),
            transparent 120px
        );

    border-left: 3px solid var(--accent);
}

/* =========================================================
   Header
   ========================================================= */

.comment-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    flex-wrap: wrap;

    gap: 0.75rem;

    margin-bottom: 0.9rem;

    padding-bottom: 0.75rem;

    border-bottom: 1px solid #f1f5f9;
}

/* =========================================================
   Author
   ========================================================= */

.comment-author {

    font-size: 0.95rem;

    font-weight: 600;

    color: var(--text);

    background: #f3f4f6;

    padding: 0.35rem 0.7rem;

    border-radius: 999px;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.9),
        0 1px 2px rgba(0,0,0,0.05);
}

/* =========================================================
   Date
   ========================================================= */

.comment-date {

    font-size: 0.82rem;

    color: var(--muted);

    background: #fafafa;

    border: 1px solid #ececec;

    padding: 0.3rem 0.6rem;

    border-radius: 999px;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.8),
        0 1px 2px rgba(0,0,0,0.03);
}

/* =========================================================
   Body
   ========================================================= */

.comment-body {

    color: var(--text);

    line-height: 1.75;

    font-size: 0.97rem;

    overflow-wrap: anywhere;
}

.comment-body p:last-child {
    margin-bottom: 0;
}

/* =========================================================
   Reply button
   ========================================================= */

.reply-btn {

    margin-top: 0.9rem;

    border: none;

    background: transparent;

    color: var(--accent);

    font-size: 0.88rem;

    font-weight: 500;

    cursor: pointer;

    padding: 0;

    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
}

.reply-btn:hover {

    opacity: 0.8;

    transform: translateX(2px);
}

/* =========================================================
   Replies container
   ========================================================= */

.replies {
    margin-top: 0.75rem;
}

/* =========================================================
   Reply form
   ========================================================= */

.reply-form-container {

    margin-top: 1rem;
}

.reply-form-container.hidden {
    display: none;
}

.reply-form {

    background: var(--soft-bg);

    border: 1px solid var(--border);

    border-radius: 14px;

    padding: 1rem;
}

/* =========================================================
   Inputs
   ========================================================= */

.form-control {

    width: 100%;

    border-radius: 12px;

    border: 1px solid #dbe1e8;

    padding: 0.75rem 0.9rem;

    font-size: 0.95rem;

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

.form-control:focus {

    outline: none;

    border-color: rgba(37,99,235,0.4);

    box-shadow:
        0 0 0 4px rgba(37,99,235,0.08);
}

textarea.form-control {

    min-height: 120px;

    resize: vertical;
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {

    border-radius: 12px;

    padding: 0.65rem 1rem;

    font-weight: 600;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

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

/* =========================================================
   Main form wrapper
   ========================================================= */

.comment-form-wrapper {

    margin-top: 2rem;

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #fafafa
        );

    border: 1px solid var(--border);

    border-radius: 18px;

    padding: 1.5rem;

    box-shadow: var(--shadow);
}

/* =========================================================
   Messages
   ========================================================= */

.comment-msg {

    display: none;

    margin-bottom: 1rem;

    padding: 0.9rem 1rem;

    border-radius: 12px;

    font-size: 0.92rem;

    font-weight: 500;
}

.comment-msg.success {

    display: block;

    color: #166534;

    background: #ecfdf3;

    border: 1px solid #bbf7d0;
}

.comment-msg.error {

    display: block;

    color: #991b1b;

    background: #fef2f2;

    border: 1px solid #fecaca;
}

/* =========================================================
   Honeypot
   ========================================================= */

.honeypot {
    position: absolute;
    left: -9999px;
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 640px) {

    .comment {
        padding: 0.9rem;
    }

    .comment.reply {
        margin-left: 0.45rem;
    }

    .comment-header {
        align-items: flex-start;
    }

    .comment-author {
        font-size: 0.9rem;
    }

    .comment-body {
        font-size: 0.94rem;
        line-height: 1.7;
    }

    .reply-form {
        padding: 0.9rem;
    }

    .comment-form-wrapper {
        padding: 1rem;
    }
}
