/* Custom Comments Styles */
.custom-comments-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.comments-count {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.comments-list {
    margin-bottom: 24px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    flex-shrink: 0;
}

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

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

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.comment-date {
    font-size: 12px;
    color: #9ca3af;
}

.comment-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.like-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 13px;
    color: #6b7280;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.like-button:hover {
    background: #f3f4f6;
    color: #374151;
}

.like-button.liked {
    color: #ef4444;
}

.like-button.liked .like-icon {
    color: #ef4444;
}

.like-icon {
    font-size: 16px;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.like-button.liked .like-icon {
    animation: likeAnimation 0.3s ease;
}

@keyframes likeAnimation {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.like-count {
    font-weight: 500;
}

/* Comment Form */
.comment-form-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-top: 20px;
}

.comment-form-avatar {
    flex-shrink: 0;
}

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

.comment-form-input {
    flex: 1;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

#comment-input {
    flex: 1;
    min-height: 44px;
    max-height: 200px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

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

#comment-input::placeholder {
    color: #9ca3af;
}

.submit-comment-btn {
    padding: 10px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.submit-comment-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.submit-comment-btn:active {
    transform: translateY(0);
}

.submit-comment-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.comment-message {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.comment-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.comment-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.login-message {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
}

.login-message a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.login-message a:hover {
    text-decoration: underline;
}

.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 640px) {
    .custom-comments-wrapper {
        padding: 16px;
    }
    
    .comment-form-wrapper {
        flex-direction: column;
    }
    
    .comment-form-input {
        width: 100%;
    }
    
    .submit-comment-btn {
        width: 100%;
    }
    
    .comment-avatar img,
    .comment-form-avatar img {
        width: 36px;
        height: 36px;
    }
}