﻿.comment-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999999;
}

.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0;
    transition: .25s;
    backdrop-filter: blur(2px);
}

.drawer-panel {
    position: absolute;
    top: 0;
    right: -460px;
    width: 430px;
    max-width: 100vw;
    height: 100%;
    background: white;
    display: flex;
    flex-direction: column;
    transition: .3s;
    box-shadow: -15px 0 40px rgba(0,0,0,.2);
}

.comment-drawer.open {
    pointer-events: auto;
}

    .comment-drawer.open .drawer-overlay {
        opacity: 1;
    }

    .comment-drawer.open .drawer-panel {
        right: 0;
    }

.drawer-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.drawer-comments {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    min-height: 0;
}

/* Comment Card Styles */
.comment-card {
    display: flex;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid #edf1f6;
    overflow: visible;
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2f67e8;
    color: white;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}



.comment-main {
    flex: 1;
    min-width: 0;
    overflow: visible;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    overflow: visible;
}

.comment-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-author {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.comment-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-card,
.comment-main,
.comment-header,
.comment-header-right {
    overflow: visible;
}

.comment-date {
    font-size: 13px;
    color: #9ca3af;
    white-space: nowrap;
}

.comment-body {
    margin-bottom: 12px;
}

.comment-text {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    word-break: break-word;
}

.comment-footer {
    display: flex;
    gap: 15px;
}

.comment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.left-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.comment-composer {
    position:sticky;
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 14px 18px;
    box-shadow: 0 -2px 10px rgba(0,0,0,.05);
}

    .comment-composer input {
        width: 100%;
        margin-bottom: 10px;
        border-radius: 25px;
        padding: 10px 15px;
        border: 1px solid #d5d9df;
    }

.comment-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

    .comment-row textarea {
        flex: 1;
        resize: none;
        min-height: 44px;
        max-height: 120px;
        border-radius: 24px;
        padding: 10px 16px;
        border: 1px solid #d5d9df;
    }

.post-comment {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: #1e6dfb;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .post-comment span {
        display: none;
    }
}

.post-comment:hover{

    transform:scale(1.05);

}

@media(max-width:768px) {

    .drawer-panel {
        width: 100%;
        right: -100%;
        border-radius: 25px 25px 0 0;
        top: 12%;
        height: 88%;
    }

    .comment-drawer.open .drawer-panel {
        right: 0;
    }

    .menu-popup {
        width: 230px;
        right: -8px;
    }

    .menu-item {
        padding: 18px;
        font-size: 16px;
    }


    .comment-input {
        flex-wrap: wrap;
    }

        .comment-input input {
            width: 100%;
        }

        .comment-input textarea {
            width: 100%;
        }

    .comment-row {
        align-items: flex-end;
    }

    .post-comment {
        flex: 0 0 46px;
        width: 46px;
        height: 46px;
    }

}

/*/Reply */

.reply-list {
    margin-top: 16px;
    margin-left: 24px;
    padding-left: 18px;
    border-left: 2px solid #edf2f7;
}

.reply-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.reply-avatar {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg,#2563eb,#4f46e5);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reply-input {
    margin-top: 12px;
    background: #f8fafc;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .reply-input input,
    .reply-input textarea {
        border: 1px solid #dbe2ea;
        border-radius: 12px;
        padding: 10px 14px;
        font-size: 14px;
        outline: none;
        transition: .2s;
    }

        .reply-input input:focus,
        .reply-input textarea:focus {
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59,130,246,.15);
        }

.reply-content {
    flex: 1;
    background: #f8fafc;
    border-radius: 16px;
    padding: 12px 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.reply-name {
    font-weight: 700;
    color: #1f2937;
    font-size: 14px;
}

.reply-date {
    font-size: 12px;
    color: #94a3b8;
    margin-left: 8px;
}

.reply-text {
    margin-top: 6px;
    color: #374151;
    line-height: 1.55;
}

.post-reply {
    align-self: flex-end;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

    .post-reply:hover {
        background: #1d4ed8;
        transform: translateY(-1px);
    }

.reply-btn {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

    .reply-btn:hover {
        text-decoration: underline;
    }

.reaction-container {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

[id^="reactionSummary-"] {
    display: flex;
    align-items: center;
    min-height: 22px;
}

.reaction-trigger {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #6b7280;
    font-size: 15px;
}

    .reaction-trigger:hover {
        color: #2563eb;
    }

.emoji-picker {
    position: absolute;
    left: 0;
    bottom: 45px;
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 8px 25px rgba(0,0,0,.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .18s ease;
    pointer-events: none;
    z-index: 1000;
}

    .emoji-picker.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }


    .emoji-picker span {
        cursor: pointer;
        font-size: 24px;
        transition: .15s;
    }

        .emoji-picker span:hover {
            transform: scale(1.45);
        }

.reaction-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
}

.reaction-icons {
    display: flex;
    align-items: center;
}

.reaction-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #fff;
    margin-left: -6px;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
    transition: .2s;
}

    .reaction-icon:first-child {
        margin-left: 0;
    }

    .reaction-icon:hover {
        transform: scale(1.25);
        z-index: 2;
    }

.reaction-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 15px;
    background: #fff;
    border: 1px solid #eee;
    margin-right: -6px;
}

.reaction-count {
    margin-left: 8px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1;
}

.comment-menu {
    margin-left: auto;
    position: relative;
}

.menu-btn {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
}

    .menu-btn:hover {
        background: #f3f4f6;
    }

.menu-popup {
    position: absolute;
    top: 42px;
    right: 0;
    min-width: 210px;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    box-shadow: 0 15px 45px rgba(0,0,0,.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(.96);
    transition: .18s;
    z-index: 9999999;
}

.comment-menu.open .menu-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    transition: .15s;
}

    .menu-item i {
        width: 18px;
        text-align: center;
        color: #6b7280;
    }

    .menu-item:hover {
        background: #f8fafc;
    }

    .menu-item.delete-comment {
        color: #dc2626;
    }

        .menu-item.delete-comment i {
            color: #dc2626;
        }

    .menu-item + .menu-item {
        border-top: 1px solid #f3f4f6;
    }

.comment-edit {
    margin-top: 10px;
}

    .comment-edit textarea {
        border-radius: 16px;
        resize: none;
        font-size: 15px;
        border: 1px solid #ddd;
    }

.edit-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-save-edit {
    border: none;
    background: #2563eb;
    color: white;
    border-radius: 20px;
    padding: 8px 20px;
}

.btn-cancel-edit {
    border: none;
    background: #f3f4f6;
    border-radius: 20px;
    padding: 8px 20px;
}

.edited-badge {
    margin-left: 8px;
    font-size: 12px;
    color: #6b7280;
}
