/* retoor <retoor@molodetz.nl> */

.post-page {
    max-width: 720px;
    margin: 0 auto;
}

.post-detail {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: 1rem;
}

.post-detail-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.post-detail-author {
    font-weight: 600;
    font-size: 0.9375rem;
}

.post-detail-level {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.post-detail-time {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-left: auto;
    padding-left: 0.75rem;
    line-height: 1.5;
}

.post-detail-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.post-detail-content {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 0.625rem;
    margin-bottom: 1rem;
}

.project-link {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--accent);
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    margin-bottom: 0.75rem;
    background: var(--bg-card-hover);
    border-radius: var(--radius);
    text-decoration: none;
}

.project-link:hover {
    text-decoration: underline;
}

.post-detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.comments-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.comments-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.comment {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0;
    position: relative;
    margin-left: calc(var(--comment-depth, 0) * 0.0625rem);
}

.comment-replies {
    margin-top: 0.75rem;
    padding-left: 0.0625rem;
    border-left: 2px solid var(--border);
}

.comment-replies-flat {
    border-left-style: dashed;
}

.comment-reply-to {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 32px;
}

.comment-vote-btn {
    padding: 0.25rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.comment-vote-btn.vote-up:hover {
    color: var(--accent);
}

.comment-vote-btn.vote-down:hover {
    color: var(--danger);
}

.comment-vote-btn.vote-up.voted {
    color: var(--accent);
    font-weight: 700;
}

.comment-vote-btn.vote-down.voted {
    color: var(--danger);
    font-weight: 700;
}

.comment-vote-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.comment-author {
    font-size: 0.8125rem;
    font-weight: 600;
}

.comment-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.comment-highlight {
    animation: comment-highlight-fade 2.5s ease-out;
    border-radius: 6px;
}

@keyframes comment-highlight-fade {
    0% {
        background-color: var(--accent-light);
    }
    100% {
        background-color: transparent;
    }
}

.comment-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.comment-action-btn {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
}

.comment-action-btn:hover {
    color: var(--text-secondary);
    background: var(--bg-card-hover);
}

.comment-thread-line {
    position: absolute;
    left: 16px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

@media (max-width: 480px) {
    .post-detail {
        padding: var(--space-lg);
    }

    .post-detail-header {
        gap: 0.5rem;
    }

    .post-detail-actions {
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .comments-section {
        padding: var(--space-lg);
    }

    .comment {
        gap: 0.375rem;
        margin-left: calc(var(--comment-depth, 0) * 0.025rem);
    }

    .comment-votes {
        min-width: 24px;
    }

    .comment-replies {
        margin-top: 0.5rem;
        padding-left: 0.5rem;
    }

    .comment-reply-to {
        display: none;
    }
}

@media (max-width: 360px) {
    .post-detail {
        padding: var(--space-md);
    }

    .comments-section {
        padding: var(--space-md);
    }

    .comment {
        gap: 0.25rem;
    }

    .comment-votes {
        min-width: 20px;
    }

    .comment-replies {
        padding-left: 0.375rem;
    }
}
