/**
 * Post Enhancements CSS
 * Modern Tags, Meta Card, Social Share, Related Posts, Comments
 */

/* ===== Modern Tags & Categories Pills ===== */
.entry-footer-inline {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.post-taxonomy-pills {
    margin: 0;
    padding: 0;
    background: transparent;
}

.taxonomy-group {
    margin-bottom: 0.75rem;
}

.taxonomy-group:last-child {
    margin-bottom: 0;
}

.taxonomy-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.813rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.813rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pill:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.pill-tag {
    color: #6366f1;
    border-color: #c7d2fe;
}

.pill-tag:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

/* ===== Related Posts Modern ===== */
.related-posts-modern {
    margin: 0 0 0 0;
    padding: 0.5rem 0 0 0;
    border-top: 2px solid #e5e7eb;
}

.related-posts-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.related-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-card-thumbnail {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.related-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-card:hover .related-card-thumbnail img {
    transform: scale(1.05);
}

.related-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
}

.related-placeholder-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-placeholder-icon svg {
    width: 48px;
    height: 48px;
    stroke: white;
    opacity: 0.9;
}

.related-card-content {
    padding: 1rem;
}

.related-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #ede9fe;
    color: #6366f1;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.related-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.813rem;
    color: #6b7280;
}

.related-date,
.related-reading-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ===== Comments System ===== */
.comments-area {
    margin: 0 0 0 0;
    padding: 0.5rem 0 0 0;
    border-top: 2px solid #e5e7eb;
}

.comments-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-item {
    margin-bottom: 2rem;
}

.comment-item .children {
    list-style: none;
    margin-left: 3rem;
    padding-left: 1.5rem;
    border-left: 2px solid #e5e7eb;
}

.comment-body {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
}

.comment-author-avatar {
    flex-shrink: 0;
}

.avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.comment-content-wrapper {
    flex: 1;
}

.comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.comment-author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.comment-author-info .fn {
    font-weight: 700;
    color: #1f2937;
}

.comment-author-info .fn a {
    color: inherit;
    text-decoration: none;
}

.comment-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-author {
    background: #dbeafe;
    color: #1e40af;
}

.badge-admin {
    background: #fef3c7;
    color: #92400e;
}

.comment-metadata {
    font-size: 0.813rem;
    color: #6b7280;
}

.comment-metadata a {
    color: inherit;
    text-decoration: none;
}

.comment-text {
    margin: 0.75rem 0;
    color: #374151;
    line-height: 1.6;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
}

.comment-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    font-size: 0.813rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-like-btn:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.comment-like-btn.liked {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.comment-like-btn svg {
    transition: transform 0.2s ease;
}

.comment-like-btn:hover svg {
    transform: scale(1.1);
}

.comment-reply-link {
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    font-size: 0.813rem;
    font-weight: 600;
    color: #2563eb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-reply-link:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* ===== Comment Form ===== */
.comment-form {
    margin-top: 2.5rem;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 12px;
}

.comment-reply-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.comment-form-field {
    margin-bottom: 1.25rem;
}

.comment-form-field label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.comment-form-field input[type="text"],
.comment-form-field input[type="email"],
.comment-form-field input[type="url"],
.comment-form-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.comment-form-field input:focus,
.comment-form-field textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comment-editor-wrapper {
    position: relative;
}

.comment-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.toolbar-left {
    display: flex;
    gap: 0.5rem;
}

.char-counter {
    font-size: 0.813rem;
    color: #6b7280;
    font-weight: 500;
}

.char-counter.warning {
    color: #dc2626;
    font-weight: 600;
}

.editor-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editor-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.comment-editor-wrapper textarea {
    border-radius: 0 0 8px 8px;
    resize: vertical;
    min-height: 150px;
}

.submit-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: #2563eb;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ===== Emoji Picker ===== */
.emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    z-index: 100;
    max-width: 300px;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.25rem;
}

.emoji-item {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.emoji-item:hover {
    background: #f3f4f6;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .comment-item .children {
        margin-left: 1rem;
        padding-left: 1rem;
    }
    
    .comment-form {
        padding: 1.25rem;
    }
}
