.post-comments-modal {
    position: fixed;
    inset: 0;
    z-index: 99999999 !important; /* Bottom Nav के ऊपर रहने के लिए */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.48);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.28s cubic-bezier(0.25, 1, 0.5, 1);
}

.post-comment-count {
    display: inline-flex !important;
    align-items: center;
    min-width: 10px;
}

.post-comments-modal.show {
    opacity: 1;
    pointer-events: auto;
}

/* 📱 INSTAGRAM-STYLE STRETCHABLE & EXPANDABLE SHEET */
.post-comments-sheet {
    width: 100%;
    max-width: 540px;
    height: min(85vh, 760px); /* Expandable maximum bound */
    background: #ffffff;
    border-radius: 22px 22px 0 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -16px 46px rgba(0,0,0,0.28);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, height;
    overflow: hidden;
}

.post-comments-modal.show .post-comments-sheet {
    transform: translateY(0);
}

/* 🔥 POLISHED INSTAGRAM-STYLE DRAG HANDLE BAR */
.post-comments-drag-handle {
    width: 42px;
    height: 4.5px;
    border-radius: 999px;
    background: #D1D5DB;
    margin: 10px auto 2px;
    flex-shrink: 0;
    cursor: grab;
    transition: background 0.15s ease, transform 0.15s ease;
}

.post-comments-drag-handle:active {
    cursor: grabbing;
    background: #9CA3AF;
    transform: scaleX(1.1);
}

.post-comments-header {
    padding: 10px 22px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #F3F4F6;
}

.post-comments-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #111827;
}

.post-comments-header h3 span {
    color: #6B7280;
    font-size: 14px;
    font-weight: 600;
}

#closePostComments,
#closeArticleComments {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #F3F4F6;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    transition: background 0.15s ease;
}

#closePostComments:active,
#closeArticleComments:active {
    background: #E5E7EB;
}

.post-comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 22px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.post-comment-row {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #F9FAFB;
}

.post-comment-avatar-fallback {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F3F4F6, #E5E7EB);
    color: #374151;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.post-comment-body-content {
    flex: 1;
    min-width: 0;
    padding-right: 28px;
}

.post-comment-user-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 3px;
}

.post-comment-user {
    font-size: 13px;
    font-weight: 800;
    color: #111827;
}

.post-comment-time-stamp {
    font-size: 11px;
    color: #9CA3AF;
}

.post-comment-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.45;
    color: #374151;
    word-break: break-word;
}

.post-comment-edited-badge {
    color: #9CA3AF;
    font-size: 12px;
}

.post-comment-actions-dropdown-wrapper {
    position: absolute;
    top: 12px;
    right: 0;
}

.post-comment-dots-trigger-btn {
    border: none;
    background: transparent;
    color: #9CA3AF;
    cursor: pointer;
    border-radius: 6px;
    padding: 5px 8px;
}

.post-comment-dots-trigger-btn:hover {
    color: #374151;
    background: #F3F4F6;
}

.post-comment-context-dropdown-menu {
    position: absolute;
    right: 0;
    top: 28px;
    min-width: 118px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 30;
}

.post-comment-context-dropdown-menu.visible-flex {
    display: flex;
}

.post-dropdown-action-item {
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px 14px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

.post-dropdown-action-item:hover {
    background: #F9FAFB;
    color: #111827;
}

.post-dropdown-action-item.post-delete-color {
    color: #EF4444;
}

.post-dropdown-action-item.post-delete-color:hover {
    background: #FEF2F2;
    color: #DC2626;
}

.post-comment-inline-edit-box {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    background: #F9FAFB;
}

.post-comment-inline-edit-box input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #D1D5DB;
    border-radius: 9px;
    background: #ffffff;
    padding: 9px 12px;
    font-size: 13px;
    outline: none;
}

.post-edit-actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.post-edit-actions-row button {
    border: none;
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.post-btn-save-edit {
    background: #111827;
    color: #ffffff;
}

.post-btn-cancel-edit {
    background: #E5E7EB;
    color: #374151;
}

.post-comments-loading,
.post-comments-empty-message {
    padding: 42px 0;
    color: #9CA3AF;
    text-align: center;
    font-size: 13px;
}

.post-comments-loading i {
    display: inline-block;
    animation: postCommentSpin 0.9s linear infinite;
}

.post-comments-input-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px calc(12px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-top: 1px solid #F3F4F6;
}

.post-comments-input-wrap input {
    flex: 1;
    min-width: 0;
    border: 1px solid #E5E7EB;
    border-radius: 999px;
    background: #F9FAFB;
    padding: 12px 16px;
    font-size: 13.5px;
    outline: none;
}

.post-comments-input-wrap input:focus {
    border-color: #D1D5DB;
    background: #ffffff;
}

#sendPostCommentBtn,
#sendArticleCommentBtn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #F13423;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: transform 0.12s ease;
}

#sendPostCommentBtn:active,
#sendArticleCommentBtn:active {
    transform: scale(0.92);
}

#sendPostCommentBtn:disabled,
#sendArticleCommentBtn:disabled {
    background: #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
}

/* DELETE CONFIRMATION MODAL OVERLAY */
.post-delete-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 100000000; /* Highest priority */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(17, 24, 39, 0.45);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.2s ease;
}

.post-delete-confirm-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.post-delete-confirm-card {
    width: min(100%, 360px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.5);
    padding: 22px;
    transform: translateY(12px) scale(0.96);
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.post-delete-confirm-modal.show .post-delete-confirm-card {
    transform: translateY(0) scale(1);
}

.post-delete-confirm-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FEF2F2;
    color: #DC2626;
    font-size: 20px;
    margin-bottom: 14px;
}

.post-delete-confirm-copy h3 {
    margin: 0 0 6px;
    color: #111827;
    font-size: 18px;
    line-height: 1.2;
}

.post-delete-confirm-copy p {
    margin: 0;
    color: #6B7280;
    font-size: 13.5px;
    line-height: 1.45;
}

.post-delete-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.post-delete-confirm-actions button {
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
}

.post-delete-confirm-cancel {
    background: #F3F4F6;
    color: #374151;
}

.post-delete-confirm-danger {
    background: #EF4444;
    color: #ffffff;
}

.post-comment-spinner-active {
    animation: postCommentSpin 0.8s linear infinite;
}

@keyframes postCommentSpin {
    to { transform: rotate(360deg); }
}

/* 📱 MOBILE RESPONSIVE TUNING */
@media (max-width: 767px) {
    .post-comments-modal {
        background: rgba(0,0,0,0.42);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }

    .post-comments-sheet {
        max-width: none;
        height: min(80vh, 700px);
        border-radius: 20px 20px 0 0;
    }

    .post-comments-header {
        padding: 10px 16px 12px;
    }

    .post-comments-header h3 {
        font-size: 15px;
    }

    .post-comments-list {
        padding: 6px 16px;
    }

    .post-comment-row {
        gap: 10px;
        padding: 12px 0;
    }

    .post-comment-avatar-fallback {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }

    .post-comment-user {
        font-size: 12px;
    }

    .post-comment-time-stamp {
        font-size: 10px;
    }

    .post-comment-text {
        font-size: 12.5px;
        line-height: 1.4;
    }

    .post-comments-input-wrap {
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        gap: 10px;
    }

    .post-comments-input-wrap input {
        padding: 11px 16px;
        font-size: 13px;
    }

    #sendPostCommentBtn,
    #sendArticleCommentBtn {
        width: 38px;
        height: 38px;
    }
}

/* 💻 DESKTOP SIDEBAR FLOATING DRAWER */
@media (min-width: 992px) {
    .post-comments-modal {
        align-items: stretch;
        justify-content: flex-end;
        background: rgba(0,0,0,0.24);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .post-comments-sheet {
        position: fixed;
        top: 16px;
        right: max(16px, calc((100vw - 260px - 640px - 440px - 28px) / 2));
        width: min(440px, calc(100vw - 300px));
        max-width: 440px;
        height: calc(100vh - 32px);
        border-radius: 18px;
        box-shadow: 0 24px 70px rgba(0,0,0,0.24), 0 0 0 1px rgba(255,255,255,0.55);
        transform: translateX(28px);
    }

    .post-comments-modal.show .post-comments-sheet {
        transform: translateX(0);
    }

    .post-comments-drag-handle {
        display: none;
    }

    .post-comments-header {
        padding: 18px 20px;
    }

    .post-comments-list {
        padding: 10px 20px;
    }

    .post-comments-input-wrap {
        padding: 14px 20px;
        border-bottom-left-radius: 18px;
        border-bottom-right-radius: 18px;
    }
}