/* Comments Panel */
.comments-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.comments-panel.active {
    right: 0;
}

.comments-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #E2E8F0;
    background: #F8FAFC;
}

.comments-panel-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1E293B;
    margin: 0;
}

.comments-close-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: #64748B;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.comments-close-btn:hover {
    background: #E2E8F0;
    color: #1E293B;
}

.comments-panel-entity {
    padding: 12px 24px;
    background: #F1F5F9;
    border-bottom: 1px solid #E2E8F0;
    font-size: 13px;
    color: #64748B;
    font-weight: 500;
}

.comments-panel-entity span {
    color: #1E293B;
    font-weight: 600;
}

.comments-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    background: #F8FAFC;
    border-radius: 8px;
    padding: 12px 14px;
    border-left: 3px solid #3B82F6;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-size: 13px;
    font-weight: 600;
    color: #1E293B;
}

.comment-date {
    font-size: 11px;
    color: #64748B;
}

.comment-delete-btn {
    background: none;
    border: none;
    color: #cb3c3c;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-delete-btn:hover {
    background: #FEE2E2;
    color: #DC2626;
}

.comment-text {
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.no-comments,
.loading-comments,
.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #94A3B8;
    font-size: 14px;
}

.error-message {
    color: #DC2626;
}

.comments-panel-footer {
    padding: 16px 24px;
    border-top: 1px solid #E2E8F0;
    background: #F8FAFC;
}

.comment-input {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.comment-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.comment-submit-btn {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
}

.comment-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon-comment {
    background: #F1F5F9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #64748B;
}

.btn-icon-comment:hover {
    background: #3B82F6;
    color: white;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .comments-panel {
        width: 100vw;
        right: -100vw;
    }
    
    .comments-panel.active {
        right: 0;
    }
}
