/**
 * Kommentare unter dem Blogbeitrag
 * Pfad: /pages/blog-post/assets/comments.css
 * Eingebunden über: /pages/blog-post/sections/comments.php
 *
 * Eigenes CSS mit Design-System-Variablen (kein Tailwind), damit die Darstellung
 * unabhängig vom kompilierten Tailwind-Build funktioniert.
 */
.lp-comments {
    margin: 2.5rem 0 2rem;
    padding-top: 2rem;
    border-top: 1px solid hsl(var(--border));
}
.lp-comments-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
}
.lp-comments-count {
    color: hsl(var(--muted-foreground));
    font-weight: 500;
}
.lp-comments-empty {
    color: hsl(var(--muted-foreground));
    margin: 0 0 1.5rem;
}
.lp-comments-notice {
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
}
.lp-comments-notice--ok {
    background: hsl(var(--primary) / 0.12);
    color: hsl(var(--primary-text));
}
.lp-comments-notice--error {
    background: hsl(0 85% 60% / 0.12);
    color: hsl(0 70% 40%);
}

.lp-comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.lp-comment-thread {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.lp-comment {
    display: flex;
    gap: 0.875rem;
    padding: 1rem 1.125rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border) / 0.7);
    border-radius: 0.875rem;
}
.lp-comment--reply {
    margin-left: 2.75rem;
    background: hsl(var(--muted) / 0.35);
}
.lp-comment--team {
    border-color: hsl(var(--primary) / 0.45);
}
.lp-comment-avatar {
    flex: 0 0 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: hsl(var(--primary) / 0.15);
    color: hsl(var(--primary-text));
}
.lp-comment--team .lp-comment-avatar {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}
.lp-comment-body {
    flex: 1;
    min-width: 0;
}
.lp-comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}
.lp-comment-name {
    font-weight: 600;
}
.lp-comment-meta time {
    color: hsl(var(--muted-foreground));
    font-size: 0.8125rem;
}
.lp-comment-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.0625rem 0.5rem;
    border-radius: 9999px;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}
.lp-comment-replyto {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.125rem;
}
.lp-comment-text {
    margin-top: 0.375rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.lp-comment-reply-btn {
    margin-top: 0.5rem;
    background: none;
    border: 0;
    padding: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: hsl(var(--primary-text));
    cursor: pointer;
}
.lp-comment-reply-btn:hover {
    text-decoration: underline;
}

/* Formular */
.lp-comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border) / 0.7);
    border-radius: 1rem;
}
.lp-comment > .lp-comment-body .lp-comment-form,
.lp-comment-thread .lp-comment-form {
    margin-top: 0.75rem;
}
.lp-comment-thread .lp-comment-form {
    margin-left: 2.75rem;
}
.lp-comment-form-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}
.lp-comment-replying {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: hsl(var(--primary) / 0.1);
    font-size: 0.875rem;
}
.lp-comment-replying[hidden] {
    display: none;
}
.lp-comment-cancel {
    background: none;
    border: 0;
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    text-decoration: underline;
}
.lp-comment-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 1rem;
}
.lp-comment-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}
.lp-comment-field em {
    font-style: normal;
    font-weight: 400;
    color: hsl(var(--muted-foreground));
}
.lp-comment-field input,
.lp-comment-field textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font: inherit;
    font-weight: 400;
}
.lp-comment-field textarea {
    resize: vertical;
    min-height: 7rem;
}
.lp-comment-field input:focus,
.lp-comment-field textarea:focus {
    outline: 2px solid hsl(var(--primary) / 0.5);
    outline-offset: 1px;
    border-color: hsl(var(--primary));
}
.lp-comment-field .is-invalid {
    border-color: hsl(0 70% 50%);
}
.lp-comment-hint {
    font-weight: 400;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}
.lp-comment-consent {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: hsl(var(--muted-foreground));
}
.lp-comment-consent input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}
.lp-comment-consent a {
    color: hsl(var(--primary-text));
    text-decoration: underline;
}
.lp-comment-error {
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    background: hsl(0 85% 60% / 0.12);
    color: hsl(0 70% 40%);
    font-size: 0.875rem;
}
.lp-comment-error[hidden] {
    display: none;
}
.lp-comment-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}
.lp-comment-submit {
    padding: 0.625rem 1.25rem;
    border: 0;
    border-radius: 0.5rem;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    font-weight: 600;
    cursor: pointer;
}
.lp-comment-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}
.lp-comment-note {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

/* Honeypot: aus dem sichtbaren Bereich, aber nicht display:none (manche Bots prüfen das) */
.lp-comment-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 640px) {
    .lp-comment--reply,
    .lp-comment-thread .lp-comment-form {
        margin-left: 1rem;
    }
    .lp-comment {
        padding: 0.875rem;
        gap: 0.625rem;
    }
}
