/* Comments Section Styling */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    max-width: 720px; /* Keep comments narrow */
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px; /* Add padding for spacing inside narrow container */
    padding-right: 15px;
}

.comments-title,
.comment-reply-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0; /* Add bottom margin */
}

.comment-list .comment {
    margin-bottom: 1.5rem;
    padding-bottom: 0;
    border-bottom: none;
}
.comment-list > .comment:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.comment-list .children {
    list-style: none;
    padding-left: 40px;
    margin-top: 1rem;
    border-left: 2px solid #eee;
    padding-top: 1rem;
}

.comment-body {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    position: relative;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #eee;
}

.comment-author {
    margin-bottom: 0;
    flex-shrink: 0;
}

.comment-author .avatar {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.comment-content-wrapper {
    flex-grow: 1;
}

.comment-meta-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.comment-author .fn {
    font-weight: bold;
    font-size: 1rem;
}

.comment-author .says {
    display: none;
}

.comment-metadata {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0;
}
.comment-metadata a {
    color: #555;
    text-decoration: none;
}
.comment-metadata a:hover {
    text-decoration: underline;
}

.comment-content {
    line-height: 1.6;
    font-size: 0.95rem;
}
.comment-content p:last-child {
    margin-bottom: 0;
}

.reply {
    margin-top: 0;
    font-size: 0.85rem;
}
.comment-reply-link {
    text-decoration: none;
    color: var(--primary-accent);
    font-weight: 600;
}
.comment-reply-link:hover {
    text-decoration: underline;
    color: var(--secondary-accent);
}

/* Comment Form Styling */
.comment-respond {
    margin-top: 2rem;
}

/* Grid layout for Name, Email, URL */
.comment-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
    grid-template-areas:
        "author email url"
        "comment comment comment"
        "cookies cookies cookies"
        "notes notes notes"
        "submit submit submit";
    gap: 1rem; /* Spacing between grid items */
}

.comment-form-author { grid-area: author; }
.comment-form-email { grid-area: email; }
.comment-form-url { grid-area: url; }
.comment-form-comment { grid-area: comment; }
.comment-form-cookies-consent { grid-area: cookies; margin-bottom: 0 !important; /* Override default margin */ }
.form-submit { grid-area: submit; }
.comment-notes { grid-area: notes; margin-bottom: 0 !important; /* Override default margin */ }
.logged-in-as { grid-area: notes; margin-bottom: 0 !important; } /* Logged-in uses same area */

/* Ensure labels and inputs are within their grid area */
.comment-form p {
    margin: 0; /* Reset default paragraph margins */
}

.comment-form label {
    display: block;
    margin-bottom: 0.3rem; /* Reduced margin */
    font-weight: 600;
    font-size: 0.9rem; /* Slightly smaller label */
    color: #555;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px; /* Adjusted padding */
    border: 1px solid #ccc; /* Slightly darker border */
    border-radius: 4px; /* Consistent radius */
    margin-bottom: 0; /* Remove margin, rely on grid gap */
    font-size: 0.95rem;
    background-color: #fff; /* White background */
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05); /* Subtle inner shadow */
    line-height: 1.5;
}

/* Add focus style */
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.2), inset 0 1px 2px rgba(0,0,0,0.05); /* Subtle glow using primary accent */
    outline: none;
}

.comment-form textarea {
    min-height: 120px; /* Ensure textarea has decent height */
    resize: vertical; /* Allow vertical resize */
}

.comment-form input[type="submit"] {
    cursor: pointer;
    width: auto; /* Allow button to size to content */
    padding: 10px 25px; /* Adjusted padding */
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px; /* Match input radius */
    justify-self: start; /* Align button to the start of its grid area */
}

.comment-form .comment-notes,
.comment-form .logged-in-as {
    font-size: 0.8rem; /* Smaller text */
    color: #555;
    padding: 8px 10px; /* Adjusted padding */
    background-color: #f8f9fa;
    border: 1px solid #eee; /* Use solid border */
    border-radius: 4px;
    line-height: 1.4;
}
.comment-form .logged-in-as a {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 600;
}
.comment-form .logged-in-as a:hover {
    text-decoration: underline;
}

.comment-form .comment-form-cookies-consent {
    font-size: 0.85rem;
    color: #555;
    display: flex;
    align-items: center;
}

.comment-form .comment-form-cookies-consent input {
    width: auto; /* Reset width for checkbox */
    margin-right: 8px;
    margin-top: -2px; /* Fine-tune alignment */
    flex-shrink: 0;
}

.comment-form .comment-form-cookies-consent label {
    display: inline-block;
    font-weight: normal;
    margin-bottom: 0;
}

/* Responsive adjustments for comment form grid */
@media (max-width: 600px) {
    .comment-form {
        grid-template-columns: 1fr; /* Stack columns */
        grid-template-areas:
            "author"
            "email"
            "url"
            "comment"
            "cookies"
            "notes"
            "submit";
    }
} 