/* ============================================================
   POST CARDS (Blogs) – Kazuma Ali Portfolio
   ============================================================ */

.post-card {
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}
.post-card button {
    margin: 0;
}
.post-card .post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.post-card .post-profile-pic {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(78, 205, 196, 0.25);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.post-card .post-author {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem 0.6rem;
}
.post-card .post-author strong {
    color: #eaf4f0;
}
.post-card .post-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
    white-space: nowrap;
}
[dir="rtl"] .post-card .post-date {
    margin-left: 0;
    margin-right: auto;
    white-space: nowrap;
}
.post-card .post-body {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0.8rem 0 1rem;
    white-space: pre-wrap;
    word-break: break-word;
}
.post-card .post-actions {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.post-card .post-actions button {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(78, 205, 196, 0.10);
    border-radius: 50px;
    padding: 0.35rem 1.2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.post-card .post-actions button:hover {
    background: rgba(78, 205, 196, 0.10);
    border-color: #4ecdc4;
    transform: translateY(-2px);
}
.post-card .post-actions button.active {
    background: rgba(78, 205, 196, 0.15);
    border-color: #4ecdc4;
    color: #6ee0d6;
}
.post-card .post-actions .count {
    font-weight: 600;
    font-size: 0.8rem;
}

/* ---------- COMMENTS ---------- */
.comments-section {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(78, 205, 196, 0.08);
}

.delete-comment-btn {
    background: red;
}
.comment {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1.2rem;
    margin-bottom: 0.8rem;
    border-left: 2px solid rgba(78, 205, 196, 0.15);
}
[dir="rtl"] .comment {
    border-left: none;
    border-right: 2px solid rgba(78, 205, 196, 0.15);
}
.comment-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.8rem;
}
.comment-profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(78, 205, 196, 0.15);
}
.comment-author {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem 0.6rem;
}
.comment-author strong {
    color: var(--text-primary);
}
.comment-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: auto;
}
[dir="rtl"] .comment-date {
    margin-left: 0;
    margin-right: auto;
}
.comment-body {
    margin: 0.4rem 0 0.2rem 2.6rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.comment-actions {
    margin-top: 0.3rem;
    margin-left: 2.6rem;
}
[dir="rtl"] .comment-actions {
    margin-left: 0;
    margin-right: 2.6rem;
}
.comment-actions .reply-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: color var(--transition);
    padding: 0;
}
.comment-actions .reply-btn:hover {
    color: #6ee0d6;
}
.reply {
    margin-left: 2rem;
    border-left: 2px solid rgba(78, 205, 196, 0.08);
    padding-left: 1rem;
}
[dir="rtl"] .reply {
    margin-left: 0;
    margin-right: 2rem;
    border-left: none;
    border-right: 2px solid rgba(78, 205, 196, 0.08);
    padding-left: 0;
    padding-right: 1rem;
}

.post-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.post-actions-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.post-date .time-ago {
    opacity: 0.7;
    font-size: 0.75rem;
    margin-left: 0.3rem;
}

.post-header form,
.post-header button {
    margin: 0;
}

.post-actions-top form {
    display: flex;
}

/* Active state for like/dislike buttons */
.post-actions .like-btn.active svg,
.post-actions .dislike-btn.active svg {
    fill: #4ecdc4;
    filter: drop-shadow(0 0 6px rgba(78, 205, 196, 0.5));
}

/* Bell toggle active state */
#notifyMyBlogBell.active svg,
#notifyProjectsBell.active svg {
    fill: #4ecdc4;
}

/* ========== FIXED: HIDDEN UTILITY ========== */
.hidden {
    display: none !important;
}

/* ========== FIXED: EDIT FORMS ========== */
.post-edit-form,
.comment-edit-form {
    display: none;
}

/* When the hidden class is removed, show the form */
.post-edit-form:not(.hidden),
.comment-edit-form:not(.hidden) {
    display: block !important;
}

/* Make sure the form is visible when editing */
.post-edit-form.show,
.comment-edit-form.show {
    display: block !important;
}

/* Reply form */
.reply-form {
    display: none;
}
.reply-form:not(.hidden) {
    display: block !important;
}

/* Comments section */
.comments-section {
    display: none;
}
.comments-section:not(.hidden) {
    display: block !important;
}

/* ========== FIXED: EDIT TEXTAREA ========== */
.edit-textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: #eaf4f0 !important;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s;
}
.edit-textarea:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.edit-buttons {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.edit-buttons .save-btn,
.edit-buttons .cancel-btn {
    padding: 0.4rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.edit-buttons .save-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
}
.edit-buttons .save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.4);
}
.edit-buttons .cancel-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.edit-buttons .cancel-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}