/* ==========================================
   COMMENT SHEET STYLES - ENHANCED
   ========================================== */

.comment-sheet {
    position: fixed;
    right: -500px;
    top: 0;
    width: 500px;
    height: 100vh;
    background-color: #1a1a1a;
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.5);
}

.comment-sheet.open {
    right: 0;
}

.comment-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}

.comment-sheet-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #2a2a2a;
    border: 1px solid #333;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background-color: #333;
    border-color: #444;
    transform: rotate(90deg);
}

.comment-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
}

/* Loading State */
.loading-comments,
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #999;
    text-align: center;
}

.loading-comments .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

.error-message i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

/* No Comments State */
.no-comments-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.no-comments-container i {
    font-size: 4rem;
    color: #444;
    margin-bottom: 1rem;
}

.no-comments-text {
    font-size: 1.125rem;
    color: #fff;
    margin-bottom: 0.5rem;
    display: block;
}

.no-comments-subtext {
    font-size: 0.875rem;
    color: #999;
    margin: 0;
}

/* Comment Item */
.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background-color: #2a2a2a;
    transition: all 0.3s ease;
    position: relative;
}

.comment-item:hover {
    background-color: #333;
}

.comment-item.pinned {
    background-color: #2d2520;
    border: 1px solid #ff6b3533;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: #fff;
    text-transform: uppercase;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.comment-user {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.pin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background-color: #ff6b3522;
    color: #ff6b35;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.pin-badge i {
    font-size: 0.625rem;
}

.comment-text {
    font-size: 0.875rem;
    color: #ccc;
    margin: 0 0 0.5rem 0;
    word-wrap: break-word;
    line-height: 1.5;
    white-space: pre-wrap;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: #999;
}

.comment-time {
    cursor: default;
}

.comment-like-btn,
.comment-reply-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    font-size: 0.75rem;
    transition: color 0.2s ease;
}

.comment-like-btn:hover,
.comment-reply-btn:hover {
    color: #ff6b35;
}

.comment-like-btn.liked {
    color: #ff6b35;
}

.comment-like-btn .like-count {
    font-weight: 600;
}

/* Comment Actions Menu */
.comment-actions-menu {
    position: relative;
}


.delete-comment-button{
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    font-size: 0.75rem;
    transition: color 0.2s ease;
}

.comment-menu-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.comment-menu-btn:hover {
    background-color: #444;
    color: #fff;
}

.comment-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 150px;
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.comment-dropdown.show {
    display: block;
}

.comment-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: #ccc;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.comment-dropdown .dropdown-item:hover {
    background-color: #333;
    color: #fff;
}

.comment-dropdown .dropdown-item.text-danger {
    color: #dc3545;
}

.comment-dropdown .dropdown-item.text-danger:hover {
    background-color: #dc354522;
}

/* Edit Input */
.edit-input-container {
    margin-top: 0.5rem;
}

.edit-input {
    width: 100%;
    padding: 0.75rem;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.edit-input:focus {
    outline: none;
    border-color: #ff6b35;
}

.edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-cancel,
.btn-save {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background-color: #444;
    color: #ccc;
}

.btn-cancel:hover {
    background-color: #555;
}

.btn-save {
    background: linear-gradient(90deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
}

.btn-save:hover {
    transform: scale(1.05);
}

/* Reply Input */
.reply-input-container {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background-color: #222;
    border-radius: 0.5rem;
}

.reply-input {
    width: 100%;
    padding: 0.625rem;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 0.375rem;
    color: #fff;
    font-size: 0.875rem;
}

.reply-input:focus {
    outline: none;
    border-color: #ff6b35;
}

.reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-send {
    padding: 0.5rem 1rem;
    background: linear-gradient(90deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    border-radius: 0.375rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-send:hover {
    transform: scale(1.05);
}

/* Replies Container */
.replies-container {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #444;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reply-item {
    display: flex;
    gap: 0.75rem;
}

.reply-item .comment-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.reply-item .comment-user {
    font-size: 0.875rem;
}

.reply-item .comment-text {
    font-size: 0.8125rem;
}

/* Comment Sheet Footer */
.comment-sheet-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #333;
    background-color: #222;
    flex-shrink: 0;
}

.comment-sheet-footer input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #333;
    border-radius: 0.5rem;
    background-color: #2a2a2a;
    color: #fff;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.comment-sheet-footer input:focus {
    outline: none;
    border-color: #ff6b35;
    background-color: #333;
}

.comment-sheet-footer button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    border-radius: 0.5rem;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.comment-sheet-footer button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.comment-sheet-footer button:active {
    transform: scale(0.98);
}

/* Scrollbar styling */
.comment-sheet-body::-webkit-scrollbar {
    width: 6px;
}

.comment-sheet-body::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.comment-sheet-body::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.comment-sheet-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .comment-sheet {
        width: 100%;
        right: -100%;
    }
    
    .comment-sheet.open {
        right: 0;
    }
    
    .comment-item {
        padding: 0.75rem;
    }
    
    .replies-container {
        padding-left: 0.5rem;
    }
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-item,
.reply-item {
    animation: fadeIn 0.3s ease-out;
}