/**
 * 评论操作菜单样式
 * 
 * 提供统一的评论操作按钮和下拉菜单样式
 */

/* 评论操作按钮容器 */
.uap-comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

/* 操作按钮基础样式 */
.uap-comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: none;
    border: none;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.uap-comment-action-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.uap-comment-action-btn.active {
    color: #ff4757;
}

.uap-comment-action-btn svg {
    flex-shrink: 0;
}

.uap-comment-action-btn span {
    line-height: 1;
}

/* 更多菜单容器 */
.uap-comment-more-wrapper {
    position: relative;
    /* 移除 margin-left: auto，让按钮紧跟在回复按钮后面 */
}

.uap-comment-more-btn {
    padding: 4px;
}

.uap-comment-more-btn svg {
    /* 横向三个点的图标 */
    transform: rotate(0deg);
}

/* 下拉菜单 */
.uap-comment-dropdown {
    position: absolute;
    right: 0;
    bottom: 100%;
    margin-top: 4px;
    min-width: 120px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
    z-index: 100;
    overflow: hidden;
}

.uap-comment-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 下拉菜单项 */
.uap-comment-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: #333;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1.4;
}

.uap-comment-dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.uap-comment-dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.uap-comment-dropdown-item:only-child {
    border-radius: 8px;
}

.uap-comment-dropdown-item:hover {
    background: #f5f5f5;
    color: #333;
}

.uap-comment-dropdown-item:focus {
    outline: none;
    background: #f5f5f5;
    color: #333;
}

.uap-comment-dropdown-item.danger {
    color: #ff4757;
}

.uap-comment-dropdown-item.danger:hover {
    background: #fff5f5;
    color: #ff4757;
}

.uap-comment-dropdown-item.danger:focus {
    background: #fff5f5;
    color: #ff4757;
}

.uap-comment-dropdown-item svg {
    flex-shrink: 0;
}

.uap-comment-dropdown-item span {
    flex: 1;
}

/* 响应式适配 */
@media (max-width: 640px) {
    .uap-comment-actions {
        gap: 12px;
    }
    
    .uap-comment-action-btn {
        padding: 4px 6px;
        font-size: 12px;
    }
    
    .uap-comment-dropdown {
        min-width: 100px;
    }
    
    .uap-comment-dropdown-item {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* 暗色模式支持（可选） */
@media (prefers-color-scheme: dark) {
    .uap-comment-action-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    
    .uap-comment-dropdown {
        background: #2a2a2a;
        border-color: #444;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .uap-comment-dropdown-item {
        color: #e5e5e5;
    }
    
    .uap-comment-dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .uap-comment-dropdown-item.danger:hover {
        background: rgba(255, 71, 87, 0.1);
    }
}
