/**
 * Comments template 1 — editorial thread (avatar rail + stacked meta).
 */

.ah-comments-template-1 {
    --ah-comment-rail: color-mix(in srgb, var(--ahura-accent-color, #1d67e8) 38%, var(--ahura-c-border-primary, #ddd));
}

.ah-comments-template-1 .ah-comments-heading {
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
}

.ah-comments-template-1 .comments-box-title {
    font-size: clamp(1.05rem, 2.6vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid color-mix(in srgb, var(--ahura-c-text-primary, #111) 10%, transparent);
    color: var(--ahura-c-text-primary, #111);
}

.ah-comments-template-1 .ah-comments-thread-wrap ol.comment-list {
    list-style: none;
    margin: 0;
    padding-block: clamp(0.5rem, 1.8vw, 1rem);
    padding-inline: clamp(0.35rem, 1.5vw, 1rem);
}

.ah-comments-template-1 .ah-comments-thread-wrap ol.comment-list > .ah-comment-thread__item {
    margin: 0;
    padding: 0;
}

.ah-comments-template-1 .ah-comment-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: clamp(0.85rem, 2.5vw, 1.15rem);
    padding-block: clamp(1.2rem, 3.2vw, 1.65rem);
    padding-inline: clamp(0.35rem, 1.5vw, 0.85rem);
    border-bottom: 1px solid color-mix(in srgb, var(--ahura-c-text-primary, #111) 8%, transparent);
}

.ah-comments-template-1 .ah-comments-thread-wrap ol.comment-list > .ah-comment-thread__item:last-child > .ah-comment-card {
    border-bottom: none;
}

.ah-comments-template-1 .ah-comment-card__avatar img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.ah-comments-template-1 .ah-comment-card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.45rem;
}

.ah-comments-template-1 .ah-comment-card__author {
    font-weight: 700;
    font-size: 0.98rem;
}

.ah-comments-template-1 .ah-comment-card__author a {
    color: var(--ahura-c-text-primary, #111);
    text-decoration: none;
}

.ah-comments-template-1 .ah-comment-card__author a:hover {
    color: var(--ahura-accent-color, #1d67e8);
}

.ah-comments-template-1 .ah-comment-card__time {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--ahura-c-text-secondary, #666);
}

.ah-comments-template-1 .ah-comment-card__pending {
    margin: 0 0 0.5rem;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    font-size: 0.82rem;
    background: color-mix(in srgb, #f9a825 22%, transparent);
    color: #6d4c00;
}

.ah-comments-template-1 .ah-comment-card__content {
    font-size: 0.96rem;
    line-height: 1.7;
    color: var(--ahura-c-text-primary, #222);
}

.ah-comments-template-1 .ah-comment-card__content p:last-child {
    margin-bottom: 0;
}

.ah-comments-template-1 .ah-comment-card__footer {
    margin-top: 0.65rem;
}

.ah-comments-template-1 .ah-comment-card__footer .comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid color-mix(in srgb, var(--ahura-accent-color, #1d67e8) 45%, var(--ahura-c-border-primary, #ccc));
    color: var(--ahura-accent-color, #1d67e8);
    background: color-mix(in srgb, var(--ahura-accent-color, #1d67e8) 7%, transparent);
    transition: background 0.15s ease, transform 0.12s ease;
}

.ah-comments-template-1 .ah-comment-card__footer .comment-reply-link:hover {
    background: color-mix(in srgb, var(--ahura-accent-color, #1d67e8) 14%, transparent);
    transform: translateY(-1px);
}

/* Nested replies */
.ah-comments-template-1 .children {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
    padding-inline-start: clamp(0.5rem, 2vw, 1rem);
    border-inline-start: 3px solid var(--ah-comment-rail);
}

.ah-comments-template-1 .children .ah-comment-card {
    padding-top: 0.85rem;
}

.ah-comments-template-1 .children .ah-comment-card__avatar img {
    width: 44px;
    height: 44px;
}

.ah-comments-template-1 .children .ah-comment-card {
    grid-template-columns: 44px minmax(0, 1fr);
}

@media screen and (max-width: 480px) {
    .ah-comments-template-1 .ah-comment-card {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .ah-comments-template-1 .ah-comment-card__avatar img {
        width: 44px;
        height: 44px;
    }
}
